summaryrefslogtreecommitdiff
path: root/src/type-checker.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2018-05-27 00:21:38 -0700
committerGitHub <noreply@github.com>2018-05-27 00:21:38 -0700
commit409d61ef5d485ae2ce783968f290050840e87a22 (patch)
treec9c80327c6a4483dcd36c8152a28aab34310511e /src/type-checker.cc
parent7a6308ac5d7e73f174aef9252bcb9f0644f4dac8 (diff)
downloadwabt-409d61ef5d485ae2ce783968f290050840e87a22.tar.gz
wabt-409d61ef5d485ae2ce783968f290050840e87a22.tar.bz2
wabt-409d61ef5d485ae2ce783968f290050840e87a22.zip
Update spec tests; rename {grow,current}_memory (#849)
`grow_memory` -> `memory.grow` `current_memory` -> `memory.size` This could have been a smaller change, but I took the opportunity to rename the Token types, Expr types, and callback functions too. Many of these are sorted alphabetically, so I resorted based on their new names.
Diffstat (limited to 'src/type-checker.cc')
-rw-r--r--src/type-checker.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/type-checker.cc b/src/type-checker.cc
index 101ee731..ac9b79ed 100644
--- a/src/type-checker.cc
+++ b/src/type-checker.cc
@@ -429,11 +429,6 @@ Result TypeChecker::OnConvert(Opcode opcode) {
return CheckOpcode1(opcode);
}
-Result TypeChecker::OnCurrentMemory() {
- PushType(Type::I32);
- return Result::Ok;
-}
-
Result TypeChecker::OnDrop() {
Result result = Result::Ok;
result |= DropTypes(1);
@@ -493,10 +488,6 @@ Result TypeChecker::OnEnd() {
return result;
}
-Result TypeChecker::OnGrowMemory() {
- return CheckOpcode1(Opcode::GrowMemory);
-}
-
Result TypeChecker::OnIf(const TypeVector* sig) {
Result result = PopAndCheck1Type(Type::I32, "if");
PushLabel(LabelType::If, *sig);
@@ -530,6 +521,15 @@ Result TypeChecker::OnLoop(const TypeVector* sig) {
return Result::Ok;
}
+Result TypeChecker::OnMemoryGrow() {
+ return CheckOpcode1(Opcode::MemoryGrow);
+}
+
+Result TypeChecker::OnMemorySize() {
+ PushType(Type::I32);
+ return Result::Ok;
+}
+
Result TypeChecker::OnRethrow() {
Result result = PopAndCheck1Type(Type::ExceptRef, "rethrow");
CHECK_RESULT(SetUnreachable());