diff options
-rw-r--r-- | src/binary-reader.cc | 2 | ||||
-rw-r--r-- | src/common.h | 30 | ||||
-rw-r--r-- | src/type-checker.cc | 8 | ||||
-rw-r--r-- | test/parse/expr/bad-try-sig-multi.txt | 4 | ||||
-rw-r--r-- | test/parse/expr/try-multi.txt | 2 | ||||
-rw-r--r-- | test/typecheck/bad-br_on_exn-mismatch.txt | 2 | ||||
-rw-r--r-- | test/typecheck/bad-br_on_exn-result-mismatch.txt | 2 |
7 files changed, 25 insertions, 25 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; } diff --git a/test/parse/expr/bad-try-sig-multi.txt b/test/parse/expr/bad-try-sig-multi.txt index 82f2323f..b57af6b2 100644 --- a/test/parse/expr/bad-try-sig-multi.txt +++ b/test/parse/expr/bad-try-sig-multi.txt @@ -7,7 +7,7 @@ i32.const 1 i32.const 2 catch - drop ;; drop except_ref + drop ;; drop exnref i32.const 3 i32.const 4 end @@ -18,7 +18,7 @@ try (param i32) drop catch - drop ;; drop except_ref + drop ;; drop exnref end return)) (;; STDERR ;;; diff --git a/test/parse/expr/try-multi.txt b/test/parse/expr/try-multi.txt index 7b020c4d..02342c52 100644 --- a/test/parse/expr/try-multi.txt +++ b/test/parse/expr/try-multi.txt @@ -19,7 +19,7 @@ try (param i32) (result i32) i32.eqz catch - drop ;; no i32 param, just except_ref + drop ;; no i32 param, just exnref i32.const 0 end return) diff --git a/test/typecheck/bad-br_on_exn-mismatch.txt b/test/typecheck/bad-br_on_exn-mismatch.txt index e7706166..37d96128 100644 --- a/test/typecheck/bad-br_on_exn-mismatch.txt +++ b/test/typecheck/bad-br_on_exn-mismatch.txt @@ -8,7 +8,7 @@ br_on_exn 0 $e drop)) (;; STDERR ;;; -out/test/typecheck/bad-br_on_exn-mismatch.txt:8:5: error: type mismatch in br_on_exn, expected [except_ref] but got [i32] +out/test/typecheck/bad-br_on_exn-mismatch.txt:8:5: error: type mismatch in br_on_exn, expected [exnref] but got [i32] br_on_exn 0 $e ^^^^^^^^^ ;;; STDERR ;;) diff --git a/test/typecheck/bad-br_on_exn-result-mismatch.txt b/test/typecheck/bad-br_on_exn-result-mismatch.txt index 8d5b3116..e5808cce 100644 --- a/test/typecheck/bad-br_on_exn-result-mismatch.txt +++ b/test/typecheck/bad-br_on_exn-result-mismatch.txt @@ -9,7 +9,7 @@ br_on_exn 0 $e end)) (;; STDERR ;;; -out/test/typecheck/bad-br_on_exn-result-mismatch.txt:8:5: error: type mismatch in try catch, expected [] but got [except_ref] +out/test/typecheck/bad-br_on_exn-result-mismatch.txt:8:5: error: type mismatch in try catch, expected [] but got [exnref] catch ^^^^^ ;;; STDERR ;;) |