diff options
author | Ben Smith <binjimin@gmail.com> | 2018-12-19 12:36:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 12:36:52 -0800 |
commit | 052d2864ec4cc45a3aca4bab1a833d1cc45e29d6 (patch) | |
tree | 750baf33c065b7ed20121e10956fbb1f0800918a /src/type-checker.cc | |
parent | 3ac02b6d3cc5bc3ff6cfe57df312b2677ca83d75 (diff) | |
download | wabt-052d2864ec4cc45a3aca4bab1a833d1cc45e29d6.tar.gz wabt-052d2864ec4cc45a3aca4bab1a833d1cc45e29d6.tar.bz2 wabt-052d2864ec4cc45a3aca4bab1a833d1cc45e29d6.zip |
The great renaming (#985)
This huge PR does all the renaming as described in issue #933. It also
updates to the latest testsuite so the new names are used.
The old names of the MVP instructions are still supported for
convenience (though we should remove those too at some point), but the
old simd and atomic instruction names are no longer supported.
Diffstat (limited to 'src/type-checker.cc')
-rw-r--r-- | src/type-checker.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/type-checker.cc b/src/type-checker.cc index 88c4c776..e7006ed0 100644 --- a/src/type-checker.cc +++ b/src/type-checker.cc @@ -350,7 +350,7 @@ Result TypeChecker::OnAtomicWait(Opcode opcode) { return CheckOpcode3(opcode); } -Result TypeChecker::OnAtomicWake(Opcode opcode) { +Result TypeChecker::OnAtomicNotify(Opcode opcode) { return CheckOpcode2(opcode); } @@ -562,20 +562,35 @@ Result TypeChecker::OnIfExcept(const TypeVector& param_types, return result; } -Result TypeChecker::OnGetGlobal(Type type) { +Result TypeChecker::OnGlobalGet(Type type) { PushType(type); return Result::Ok; } -Result TypeChecker::OnGetLocal(Type type) { - PushType(type); - return Result::Ok; +Result TypeChecker::OnGlobalSet(Type type) { + return PopAndCheck1Type(type, "global.set"); } Result TypeChecker::OnLoad(Opcode opcode) { return CheckOpcode1(opcode); } +Result TypeChecker::OnLocalGet(Type type) { + PushType(type); + return Result::Ok; +} + +Result TypeChecker::OnLocalSet(Type type) { + return PopAndCheck1Type(type, "local.set"); +} + +Result TypeChecker::OnLocalTee(Type type) { + Result result = Result::Ok; + result |= PopAndCheck1Type(type, "local.tee"); + PushType(type); + return result; +} + Result TypeChecker::OnLoop(const TypeVector& param_types, const TypeVector& result_types) { Result result = PopAndCheckSignature(param_types, "loop"); @@ -655,14 +670,6 @@ Result TypeChecker::OnSelect() { return result; } -Result TypeChecker::OnSetGlobal(Type type) { - return PopAndCheck1Type(type, "set_global"); -} - -Result TypeChecker::OnSetLocal(Type type) { - return PopAndCheck1Type(type, "set_local"); -} - Result TypeChecker::OnStore(Opcode opcode) { return CheckOpcode2(opcode); } @@ -675,13 +682,6 @@ Result TypeChecker::OnTry(const TypeVector& param_types, return result; } -Result TypeChecker::OnTeeLocal(Type type) { - Result result = Result::Ok; - result |= PopAndCheck1Type(type, "tee_local"); - PushType(type); - return result; -} - Result TypeChecker::OnUnary(Opcode opcode) { return CheckOpcode1(opcode); } |