summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-18 10:14:57 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-18 10:17:19 -0800
commit362102c3540ccbe8dc0892b34eeae26f81d3fc84 (patch)
treee08d2d682ceabafd895067a943b615b92627846c /src
parent50876c7e6893b4b86d72767dc93e3565fcb0afb9 (diff)
downloadbinaryen-362102c3540ccbe8dc0892b34eeae26f81d3fc84.tar.gz
binaryen-362102c3540ccbe8dc0892b34eeae26f81d3fc84.tar.bz2
binaryen-362102c3540ccbe8dc0892b34eeae26f81d3fc84.zip
mark host types
Diffstat (limited to 'src')
-rw-r--r--src/wasm-s-parser.h1
-rw-r--r--src/wasm.h14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index 9819c4a60..8f5e08e9d 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -636,6 +636,7 @@ private:
} else {
parseCallOperands(s, 1, ret);
}
+ ret->finalize();
return ret;
}
diff --git a/src/wasm.h b/src/wasm.h
index d9e25783a..4cab41f96 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -845,6 +845,20 @@ public:
}
return o;
}
+
+ void finalize() {
+ switch (op) {
+ case PageSize: case MemorySize: case HasFeature: {
+ type = i32;
+ break;
+ }
+ case GrowMemory: {
+ type = none;
+ break;
+ }
+ default: abort();
+ }
+ }
};
class Unreachable : public Expression {