diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-08-13 02:54:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-13 02:54:34 +0900 |
commit | a9c001a945ba35456e7ca49f1fe819db2f504bbf (patch) | |
tree | 9e2c1bdbcd947188fa64b7858948dd8f5f9ade0b /src | |
parent | 51c05065c9cd2a09f7a9e82ead17263b6d097395 (diff) | |
download | wabt-a9c001a945ba35456e7ca49f1fe819db2f504bbf.tar.gz wabt-a9c001a945ba35456e7ca49f1fe819db2f504bbf.tar.bz2 wabt-a9c001a945ba35456e7ca49f1fe819db2f504bbf.zip |
Rename except_ref type to exnref (#1142)
In WebAssembly/exception-handling#79 we agreed to rename except_ref
type to exnref.
Diffstat (limited to 'src')
-rw-r--r-- | src/binary-reader.cc | 2 | ||||
-rw-r--r-- | src/common.h | 30 | ||||
-rw-r--r-- | src/type-checker.cc | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index b50c449b..4bd90dcb 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -384,7 +384,7 @@ bool BinaryReader::IsConcreteType(Type type) { case Type::V128: return options_.features.simd_enabled(); - case Type::ExceptRef: + case Type::Exnref: return options_.features.exceptions_enabled(); case Type::Anyref: diff --git a/src/common.h b/src/common.h index 85e0337b..5d0f2cca 100644 --- a/src/common.h +++ b/src/common.h @@ -207,18 +207,18 @@ struct Location { // Matches binary format, do not change. enum class Type : int32_t { - I32 = -0x01, // 0x7f - I64 = -0x02, // 0x7e - F32 = -0x03, // 0x7d - F64 = -0x04, // 0x7c - V128 = -0x05, // 0x7b - Funcref = -0x10, // 0x70 - Anyref = -0x11, // 0x6f - ExceptRef = -0x18, // 0x68 - Func = -0x20, // 0x60 - Void = -0x40, // 0x40 - ___ = Void, // Convenient for the opcode table in opcode.h - Any = 0, // Not actually specified, but useful for type-checking + I32 = -0x01, // 0x7f + I64 = -0x02, // 0x7e + F32 = -0x03, // 0x7d + F64 = -0x04, // 0x7c + V128 = -0x05, // 0x7b + Funcref = -0x10, // 0x70 + Anyref = -0x11, // 0x6f + Exnref = -0x18, // 0x68 + Func = -0x20, // 0x60 + Void = -0x40, // 0x40 + ___ = Void, // Convenient for the opcode table in opcode.h + Any = 0, // Not actually specified, but useful for type-checking }; typedef std::vector<Type> TypeVector; @@ -377,8 +377,8 @@ static WABT_INLINE const char* GetTypeName(Type type) { return "funcref"; case Type::Func: return "func"; - case Type::ExceptRef: - return "except_ref"; + case Type::Exnref: + return "exnref"; case Type::Void: return "void"; case Type::Any: @@ -412,7 +412,7 @@ static WABT_INLINE TypeVector GetInlineTypeVector(Type type) { case Type::V128: case Type::Funcref: case Type::Anyref: - case Type::ExceptRef: + case Type::Exnref: return TypeVector(&type, &type + 1); default: diff --git a/src/type-checker.cc b/src/type-checker.cc index 581c035a..bc09c186 100644 --- a/src/type-checker.cc +++ b/src/type-checker.cc @@ -385,7 +385,7 @@ Result TypeChecker::OnBrIf(Index depth) { } Result TypeChecker::OnBrOnExn(Index depth, const TypeVector& types) { - Result result = PopAndCheck1Type(Type::ExceptRef, "br_on_exn"); + Result result = PopAndCheck1Type(Type::Exnref, "br_on_exn"); Label* label; CHECK_RESULT(GetLabel(depth, &label)); if (Failed(CheckTypes(types, label->br_types()))) { @@ -394,7 +394,7 @@ Result TypeChecker::OnBrOnExn(Index depth, const TypeVector& types) { TypesToString(types).c_str()); result = Result::Error; } - PushType(Type::ExceptRef); + PushType(Type::Exnref); return result; } @@ -481,7 +481,7 @@ Result TypeChecker::OnCatch() { ResetTypeStackToLabel(label); label->label_type = LabelType::Catch; label->unreachable = false; - PushType(Type::ExceptRef); + PushType(Type::Exnref); return result; } @@ -663,7 +663,7 @@ Result TypeChecker::OnRefIsNullExpr() { } Result TypeChecker::OnRethrow() { - Result result = PopAndCheck1Type(Type::ExceptRef, "rethrow"); + Result result = PopAndCheck1Type(Type::Exnref, "rethrow"); CHECK_RESULT(SetUnreachable()); return result; } |