summaryrefslogtreecommitdiff
path: root/src/wasm-validator.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-10-06 13:46:13 -0700
committerGitHub <noreply@github.com>2016-10-06 13:46:13 -0700
commitfcdadc6c124c3a93c68b33c26207ecd5ead47273 (patch)
tree795522da0f82b14a24a592a1aa3fc8220a9a4e33 /src/wasm-validator.h
parent9caad5e1f85a301b1123420eab45ca8caaf6e837 (diff)
downloadbinaryen-fcdadc6c124c3a93c68b33c26207ecd5ead47273.tar.gz
binaryen-fcdadc6c124c3a93c68b33c26207ecd5ead47273.tar.bz2
binaryen-fcdadc6c124c3a93c68b33c26207ecd5ead47273.zip
validate get_local type (#745)
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r--src/wasm-validator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h
index f7e3b9db1..f17ed16d5 100644
--- a/src/wasm-validator.h
+++ b/src/wasm-validator.h
@@ -230,6 +230,9 @@ public:
}
}
}
+ void visitGetLocal(GetLocal* curr) {
+ shouldBeTrue(isConcreteWasmType(curr->type), curr, "get_local must have a valid type - check what you provided when you constructed the node");
+ }
void visitSetLocal(SetLocal *curr) {
shouldBeTrue(curr->index < getFunction()->getNumLocals(), curr, "set_local index must be small enough");
if (curr->value->type != unreachable) {