summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-16 16:21:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:54:59 -0700
commit2f5c81810d827be6412056fc33188bdae622d55d (patch)
treead025fdc3b2ea379cdd7dc44d3145ddd85133e73 /src
parentccec65e3d0c980bb1079fd0946f48dea069d224e (diff)
downloadbinaryen-2f5c81810d827be6412056fc33188bdae622d55d.tar.gz
binaryen-2f5c81810d827be6412056fc33188bdae622d55d.tar.bz2
binaryen-2f5c81810d827be6412056fc33188bdae622d55d.zip
SetGlobal should not return a value
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h1
-rw-r--r--src/wasm-builder.h1
-rw-r--r--src/wasm-interpreter.h2
-rw-r--r--src/wasm-s-parser.h1
-rw-r--r--src/wasm.h4
5 files changed, 1 insertions, 8 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 5d81f01f6..fa4b78c9d 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1945,7 +1945,6 @@ public:
curr->index = getU32LEB();
assert(curr->index < wasm.globals.size());
curr->value = popExpression();
- curr->type = curr->value->type;
}
void readMemoryAccess(Address& alignment, size_t bytes, Address& offset) {
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index e68fd5ef2..d5e94a25b 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -162,7 +162,6 @@ public:
auto* ret = allocator.alloc<SetGlobal>();
ret->index = index;
ret->value = value;
- ret->type = value->type;
return ret;
}
Load* makeLoad(unsigned bytes, bool signed_, uint32_t offset, unsigned align, Expression *ptr, WasmType type) {
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index f237f63db..096b28f5e 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -719,7 +719,7 @@ public:
NOTE_EVAL1(flow.value);
assert(flow.value.type == curr->type);
instance.globals[index] = flow.value;
- return flow;
+ return Flow();
}
Flow visitLoad(Load *curr) {
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index a4dd60532..7ea9a521e 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -969,7 +969,6 @@ private:
auto ret = allocator.alloc<SetGlobal>();
ret->index = getGlobalIndex(*s[1]);
ret->value = parseExpression(s[2]);
- ret->type = wasm.getGlobal(ret->index)->type;
return ret;
}
diff --git a/src/wasm.h b/src/wasm.h
index de86ebba0..43c8b192b 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1135,10 +1135,6 @@ public:
Index index;
Expression *value;
-
- void finalize() {
- type = value->type;
- }
};
class Load : public SpecificExpression<Expression::LoadId> {