From bd52b8845aa8dcbecc8fc14d77a2bd4e64ad6e75 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Wed, 15 Jul 2020 16:39:52 -0700 Subject: [PATCH] Remove ref.is_null type parameter (#1474) See https://github.com/WebAssembly/reference-types/issues/99. This change also updates the testsuite, so the spec tests pass too. In addition, the behavior of `br_table` is no longer different from MVP, and has a text to confirm this. That is now fixed in `type-checker.cc` too. --- src/binary-reader-ir.cc | 6 +-- src/binary-reader-logging.cc | 2 +- src/binary-reader-logging.h | 2 +- src/binary-reader-nop.h | 2 +- src/binary-reader.cc | 9 ++-- src/binary-reader.h | 2 +- src/binary-writer.cc | 4 +- src/interp/binary-reader-interp.cc | 6 +-- src/ir.h | 2 +- src/shared-validator.cc | 4 +- src/shared-validator.h | 2 +- src/type-checker.cc | 17 ++++++- src/type-checker.h | 2 +- src/validator.cc | 2 +- src/wast-parser.cc | 7 +-- src/wat-writer.cc | 1 - test/decompile/basic.txt | 2 +- test/dump/reference-types.txt | 26 +++++----- test/interp/reference-types.txt | 4 +- test/parse/expr/reference-types.txt | 2 +- test/spec/binary.txt | 7 +-- test/spec/bulk-memory-operations/binary.txt | 7 +-- test/spec/reference-types/binary.txt | 7 +-- test/spec/reference-types/ref_is_null.txt | 8 ++- .../reference-types/unreached-invalid.txt | 49 ++++++++++--------- third_party/testsuite | 2 +- 26 files changed, 94 insertions(+), 90 deletions(-) diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc index e1b416976..0dc9b2b1a 100644 --- a/src/binary-reader-ir.cc +++ b/src/binary-reader-ir.cc @@ -185,7 +185,7 @@ class BinaryReaderIR : public BinaryReaderNop { Result OnTableFillExpr(Index table_index) override; Result OnRefFuncExpr(Index func_index) override; Result OnRefNullExpr(Type type) override; - Result OnRefIsNullExpr(Type type) override; + Result OnRefIsNullExpr() override; Result OnNopExpr() override; Result OnRethrowExpr() override; Result OnReturnExpr() override; @@ -919,8 +919,8 @@ Result BinaryReaderIR::OnRefNullExpr(Type type) { return AppendExpr(MakeUnique(type)); } -Result BinaryReaderIR::OnRefIsNullExpr(Type type) { - return AppendExpr(MakeUnique(type)); +Result BinaryReaderIR::OnRefIsNullExpr() { + return AppendExpr(MakeUnique()); } Result BinaryReaderIR::OnNopExpr() { diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc index ef24ad0ec..e5d727725 100644 --- a/src/binary-reader-logging.cc +++ b/src/binary-reader-logging.cc @@ -790,7 +790,7 @@ DEFINE_INDEX(OnTableSizeExpr) DEFINE_INDEX_DESC(OnTableFillExpr, "table index") DEFINE_INDEX(OnRefFuncExpr) DEFINE_TYPE(OnRefNullExpr) -DEFINE_TYPE(OnRefIsNullExpr) +DEFINE0(OnRefIsNullExpr) DEFINE0(OnNopExpr) DEFINE0(OnRethrowExpr); DEFINE_INDEX_DESC(OnReturnCallExpr, "func_index") diff --git a/src/binary-reader-logging.h b/src/binary-reader-logging.h index f59365626..fd1ac13f1 100644 --- a/src/binary-reader-logging.h +++ b/src/binary-reader-logging.h @@ -201,7 +201,7 @@ class BinaryReaderLogging : public BinaryReaderDelegate { Result OnTableFillExpr(Index table) override; Result OnRefFuncExpr(Index index) override; Result OnRefNullExpr(Type type) override; - Result OnRefIsNullExpr(Type type) override; + Result OnRefIsNullExpr() override; Result OnNopExpr() override; Result OnRethrowExpr() override; Result OnReturnCallExpr(Index func_index) override; diff --git a/src/binary-reader-nop.h b/src/binary-reader-nop.h index 1159476ae..a00d6b05b 100644 --- a/src/binary-reader-nop.h +++ b/src/binary-reader-nop.h @@ -278,7 +278,7 @@ class BinaryReaderNop : public BinaryReaderDelegate { Result OnTableFillExpr(Index table_index) override { return Result::Ok; } Result OnRefFuncExpr(Index func_index) override { return Result::Ok; } Result OnRefNullExpr(Type type) override { return Result::Ok; } - Result OnRefIsNullExpr(Type type) override { return Result::Ok; } + Result OnRefIsNullExpr() override { return Result::Ok; } Result OnNopExpr() override { return Result::Ok; } Result OnRethrowExpr() override { return Result::Ok; } Result OnReturnCallExpr(Index sig_index) override { return Result::Ok; } diff --git a/src/binary-reader.cc b/src/binary-reader.cc index ebc088ddb..7f1953568 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -1573,13 +1573,10 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) { break; } - case Opcode::RefIsNull: { - Type type; - CHECK_RESULT(ReadRefType(&type, "ref.is_null type")); - CALLBACK(OnRefIsNullExpr, type); - CALLBACK(OnOpcodeType, type); + case Opcode::RefIsNull: + CALLBACK(OnRefIsNullExpr); + CALLBACK(OnOpcodeBare); break; - } default: return ReportUnexpectedOpcode(opcode); diff --git a/src/binary-reader.h b/src/binary-reader.h index eae1e87d5..e50f4b9d7 100644 --- a/src/binary-reader.h +++ b/src/binary-reader.h @@ -267,7 +267,7 @@ class BinaryReaderDelegate { virtual Result OnTableFillExpr(Index table_index) = 0; virtual Result OnRefFuncExpr(Index func_index) = 0; virtual Result OnRefNullExpr(Type type) = 0; - virtual Result OnRefIsNullExpr(Type type) = 0; + virtual Result OnRefIsNullExpr() = 0; virtual Result OnNopExpr() = 0; virtual Result OnRethrowExpr() = 0; virtual Result OnReturnExpr() = 0; diff --git a/src/binary-writer.cc b/src/binary-writer.cc index fd2b0c245..261190fdc 100644 --- a/src/binary-writer.cc +++ b/src/binary-writer.cc @@ -684,11 +684,9 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) { WriteType(stream_, cast(expr)->type, "ref.null type"); break; } - case ExprType::RefIsNull: { + case ExprType::RefIsNull: WriteOpcode(stream_, Opcode::RefIsNull); - WriteType(stream_, cast(expr)->type, "ref.is_null type"); break; - } case ExprType::Nop: WriteOpcode(stream_, Opcode::Nop); break; diff --git a/src/interp/binary-reader-interp.cc b/src/interp/binary-reader-interp.cc index 20a8368c6..8b44cdaf5 100644 --- a/src/interp/binary-reader-interp.cc +++ b/src/interp/binary-reader-interp.cc @@ -192,7 +192,7 @@ class BinaryReaderInterp : public BinaryReaderNop { Result OnMemorySizeExpr() override; Result OnRefFuncExpr(Index func_index) override; Result OnRefNullExpr(Type type) override; - Result OnRefIsNullExpr(Type type) override; + Result OnRefIsNullExpr() override; Result OnNopExpr() override; Result OnReturnExpr() override; Result OnSelectExpr(Type result_type) override; @@ -1240,8 +1240,8 @@ Result BinaryReaderInterp::OnRefNullExpr(Type type) { return Result::Ok; } -Result BinaryReaderInterp::OnRefIsNullExpr(Type type) { - CHECK_RESULT(validator_.OnRefIsNull(loc, type)); +Result BinaryReaderInterp::OnRefIsNullExpr() { + CHECK_RESULT(validator_.OnRefIsNull(loc)); istream_.Emit(Opcode::RefIsNull); return Result::Ok; } diff --git a/src/ir.h b/src/ir.h index 424a11f5b..9b456a7b4 100644 --- a/src/ir.h +++ b/src/ir.h @@ -409,7 +409,7 @@ class RefTypeExpr : public ExprMixin { }; typedef RefTypeExpr RefNullExpr; -typedef RefTypeExpr RefIsNullExpr; +typedef ExprMixin RefIsNullExpr; template class OpcodeExpr : public ExprMixin { diff --git a/src/shared-validator.cc b/src/shared-validator.cc index f4a7303e4..8b6bef80f 100644 --- a/src/shared-validator.cc +++ b/src/shared-validator.cc @@ -968,10 +968,10 @@ Result SharedValidator::OnRefFunc(const Location& loc, Var func_var) { return result; } -Result SharedValidator::OnRefIsNull(const Location& loc, Type type) { +Result SharedValidator::OnRefIsNull(const Location& loc) { Result result = Result::Ok; expr_loc_ = &loc; - result |= typechecker_.OnRefIsNullExpr(type); + result |= typechecker_.OnRefIsNullExpr(); return result; } diff --git a/src/shared-validator.h b/src/shared-validator.h index dadb09308..3f77c403f 100644 --- a/src/shared-validator.h +++ b/src/shared-validator.h @@ -150,7 +150,7 @@ class SharedValidator { Result OnMemorySize(const Location&); Result OnNop(const Location&); Result OnRefFunc(const Location&, Var func_var); - Result OnRefIsNull(const Location&, Type type); + Result OnRefIsNull(const Location&); Result OnRefNull(const Location&, Type type); Result OnRethrow(const Location&); Result OnReturnCall(const Location&, Var func_var); diff --git a/src/type-checker.cc b/src/type-checker.cc index b823ce81d..5526640ac 100644 --- a/src/type-checker.cc +++ b/src/type-checker.cc @@ -670,8 +670,21 @@ Result TypeChecker::OnRefNullExpr(Type type) { return Result::Ok; } -Result TypeChecker::OnRefIsNullExpr(Type type) { - Result result = PopAndCheck1Type(type, "ref.is_null"); +Result TypeChecker::OnRefIsNullExpr() { + Type type; + Result result = PeekType(0, &type); + if (!type.IsRef()) { + TypeVector actual; + if (Succeeded(result)) { + actual.push_back(type); + } + std::string message = + "type mismatch in ref.is_null, expected reference but got " + + TypesToString(actual); + PrintError("%s", message.c_str()); + result = Result::Error; + } + result |= DropTypes(1); PushType(Type::I32); return result; } diff --git a/src/type-checker.h b/src/type-checker.h index 0b3560a96..00edef41e 100644 --- a/src/type-checker.h +++ b/src/type-checker.h @@ -110,7 +110,7 @@ class TypeChecker { Result OnTableFill(Type elem_type); Result OnRefFuncExpr(Index func_index); Result OnRefNullExpr(Type type); - Result OnRefIsNullExpr(Type type); + Result OnRefIsNullExpr(); Result OnRethrow(); Result OnReturn(); Result OnSelect(Type expected); diff --git a/src/validator.cc b/src/validator.cc index e23d5be1d..58e32e9d9 100644 --- a/src/validator.cc +++ b/src/validator.cc @@ -438,7 +438,7 @@ Result Validator::OnRefNullExpr(RefNullExpr* expr) { } Result Validator::OnRefIsNullExpr(RefIsNullExpr* expr) { - result_ |= validator_.OnRefIsNull(expr->loc, expr->type); + result_ |= validator_.OnRefIsNull(expr->loc); return Result::Ok; } diff --git a/src/wast-parser.cc b/src/wast-parser.cc index 90d92f872..c3ed9d282 100644 --- a/src/wast-parser.cc +++ b/src/wast-parser.cc @@ -1996,13 +1996,10 @@ Result WastParser::ParsePlainInstr(std::unique_ptr* out_expr) { break; } - case TokenType::RefIsNull: { + case TokenType::RefIsNull: ErrorUnlessOpcodeEnabled(Consume()); - Type type; - CHECK_RESULT(ParseRefKind(&type)); - out_expr->reset(new RefIsNullExpr(type, loc)); + out_expr->reset(new RefIsNullExpr(loc)); break; - } case TokenType::Throw: ErrorUnlessOpcodeEnabled(Consume()); diff --git a/src/wat-writer.cc b/src/wat-writer.cc index 66aaf07be..6bdc9f9e6 100644 --- a/src/wat-writer.cc +++ b/src/wat-writer.cc @@ -824,7 +824,6 @@ Result WatWriter::ExprVisitorDelegate::OnRefNullExpr(RefNullExpr* expr) { Result WatWriter::ExprVisitorDelegate::OnRefIsNullExpr(RefIsNullExpr* expr) { writer_->WritePutsSpace(Opcode::RefIsNull_Opcode.GetName()); - writer_->WriteRefKind(expr->type, NextChar::Newline); return Result::Ok; } diff --git a/test/decompile/basic.txt b/test/decompile/basic.txt index ae69af259..87b4d061f 100644 --- a/test/decompile/basic.txt +++ b/test/decompile/basic.txt @@ -96,7 +96,7 @@ set_local 0 nop ref.null func - ref.is_null func + ref.is_null drop i32.const 0 ;; fi call_indirect diff --git a/test/dump/reference-types.txt b/test/dump/reference-types.txt index 9650b0d96..5d2b49d5a 100644 --- a/test/dump/reference-types.txt +++ b/test/dump/reference-types.txt @@ -42,7 +42,7 @@ (func (param externref) (result i32) local.get 0 - ref.is_null extern + ref.is_null ) @@ -94,7 +94,7 @@ Code[10]: - func[3] size=8 - func[4] size=9 - func[5] size=9 - - func[6] size=6 + - func[6] size=5 - func[7] size=5 - func[8] size=5 - func[9] size=5 @@ -131,15 +131,15 @@ Code Disassembly: 00007c: 0b | end 00007e func[6]: 00007f: 20 00 | local.get 0 - 000081: d1 6f | ref.is_null extern - 000083: 0b | end -000085 func[7]: - 000086: fc 10 00 | table.size 0 - 000089: 0b | end -00008b func[8]: - 00008c: fc 10 01 | table.size 1 - 00008f: 0b | end -000091 func[9]: - 000092: fc 10 02 | table.size 2 - 000095: 0b | end + 000081: d1 | ref.is_null + 000082: 0b | end +000084 func[7]: + 000085: fc 10 00 | table.size 0 + 000088: 0b | end +00008a func[8]: + 00008b: fc 10 01 | table.size 1 + 00008e: 0b | end +000090 func[9]: + 000091: fc 10 02 | table.size 2 + 000094: 0b | end ;;; STDOUT ;;) diff --git a/test/interp/reference-types.txt b/test/interp/reference-types.txt index 9b9c45de6..34c13529a 100644 --- a/test/interp/reference-types.txt +++ b/test/interp/reference-types.txt @@ -18,7 +18,7 @@ (func $ref_is_null_func (export "ref_is_null_func") (result i32) global.get $g - ref.is_null func + ref.is_null ) (func $ref_func (export "ref_func") (result funcref) @@ -35,7 +35,7 @@ call $table_set i32.const 0 table.get $t_func - ref.is_null func + ref.is_null ) (func $global_set (export "global_set") (result funcref) diff --git a/test/parse/expr/reference-types.txt b/test/parse/expr/reference-types.txt index 2cb156f57..b452df428 100644 --- a/test/parse/expr/reference-types.txt +++ b/test/parse/expr/reference-types.txt @@ -40,7 +40,7 @@ (func (param externref) (result i32) local.get 0 - ref.is_null extern + ref.is_null ) (func (result funcref) diff --git a/test/spec/binary.txt b/test/spec/binary.txt index 92eb40ce1..629c719b5 100644 --- a/test/spec/binary.txt +++ b/test/spec/binary.txt @@ -130,12 +130,9 @@ out/test/spec/binary.wast:696: assert_malformed passed: out/test/spec/binary.wast:710: assert_malformed passed: 000001a: error: unfinished section (expected end: 0x1b) out/test/spec/binary.wast:741: assert_malformed passed: - error: invalid depth: 11 (max 2) - 0000024: error: OnBrTableExpr callback failed -out/test/spec/binary.wast:763: assert_malformed passed: error: function type variable out of range: 11 (max 1) 0000025: error: OnBlockExpr callback failed -out/test/spec/binary.wast:798: assert_malformed passed: +out/test/spec/binary.wast:776: assert_malformed passed: 0000017: error: multiple Start sections -67/67 tests passed. +66/66 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/bulk-memory-operations/binary.txt b/test/spec/bulk-memory-operations/binary.txt index a072beba3..fe18ce7e4 100644 --- a/test/spec/bulk-memory-operations/binary.txt +++ b/test/spec/bulk-memory-operations/binary.txt @@ -174,12 +174,9 @@ out/test/spec/bulk-memory-operations/binary.wast:1103: assert_malformed passed: out/test/spec/bulk-memory-operations/binary.wast:1117: assert_malformed passed: 000001a: error: unfinished section (expected end: 0x1b) out/test/spec/bulk-memory-operations/binary.wast:1148: assert_malformed passed: - error: invalid depth: 11 (max 2) - 0000024: error: OnBrTableExpr callback failed -out/test/spec/bulk-memory-operations/binary.wast:1170: assert_malformed passed: error: function type variable out of range: 11 (max 1) 0000025: error: OnBlockExpr callback failed -out/test/spec/bulk-memory-operations/binary.wast:1205: assert_malformed passed: +out/test/spec/bulk-memory-operations/binary.wast:1183: assert_malformed passed: 0000017: error: multiple Start sections -88/88 tests passed. +87/87 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/reference-types/binary.txt b/test/spec/reference-types/binary.txt index be67a936b..4009f5716 100644 --- a/test/spec/reference-types/binary.txt +++ b/test/spec/reference-types/binary.txt @@ -226,12 +226,9 @@ out/test/spec/reference-types/binary.wast:1452: assert_malformed passed: out/test/spec/reference-types/binary.wast:1466: assert_malformed passed: 000001a: error: unfinished section (expected end: 0x1b) out/test/spec/reference-types/binary.wast:1497: assert_malformed passed: - error: invalid depth: 11 (max 2) - 0000024: error: OnBrTableExpr callback failed -out/test/spec/reference-types/binary.wast:1519: assert_malformed passed: error: function type variable out of range: 11 (max 1) 0000025: error: OnBlockExpr callback failed -out/test/spec/reference-types/binary.wast:1554: assert_malformed passed: +out/test/spec/reference-types/binary.wast:1532: assert_malformed passed: 0000017: error: multiple Start sections -114/114 tests passed. +113/113 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/reference-types/ref_is_null.txt b/test/spec/reference-types/ref_is_null.txt index 633e1e872..b3cc0ede8 100644 --- a/test/spec/reference-types/ref_is_null.txt +++ b/test/spec/reference-types/ref_is_null.txt @@ -4,5 +4,11 @@ (;; STDOUT ;;; init(externref:1) => deinit() => -13/13 tests passed. +out/test/spec/reference-types/ref_is_null.wast:52: assert_invalid passed: + error: type mismatch in ref.is_null, expected reference but got [i32] + 000001b: error: OnRefIsNullExpr callback failed +out/test/spec/reference-types/ref_is_null.wast:56: assert_invalid passed: + error: type mismatch in ref.is_null, expected reference but got [] + 0000018: error: OnRefIsNullExpr callback failed +15/15 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/reference-types/unreached-invalid.txt b/test/spec/reference-types/unreached-invalid.txt index 7996413a2..f687a4a30 100644 --- a/test/spec/reference-types/unreached-invalid.txt +++ b/test/spec/reference-types/unreached-invalid.txt @@ -266,73 +266,76 @@ out/test/spec/reference-types/unreached-invalid.wast:527: assert_invalid passed: error: br_table labels have inconsistent types: expected [f32], got [] 0000023: error: OnBrTableExpr callback failed out/test/spec/reference-types/unreached-invalid.wast:540: assert_invalid passed: + error: br_table labels have inconsistent types: expected [f32], got [f64] + 0000023: error: OnBrTableExpr callback failed +out/test/spec/reference-types/unreached-invalid.wast:555: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000020: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:546: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:561: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [] 0000020: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:552: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:567: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [i64] 0000022: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:558: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:573: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000023: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:565: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:580: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000021: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:571: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:586: assert_invalid passed: error: type mismatch in block, expected [i32] but got [] 0000022: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:577: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:592: assert_invalid passed: error: type mismatch in block, expected [i32] but got [i64] 0000024: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:584: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:599: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000023: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:590: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:605: assert_invalid passed: error: type mismatch in block, expected [i32] but got [] 0000025: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:596: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:611: assert_invalid passed: error: type mismatch in block, expected [i32] but got [i64] 0000027: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:604: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:619: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000024: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:611: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:626: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000020: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:617: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:632: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [] 0000022: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:623: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:638: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [i64] 0000024: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:629: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:644: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000025: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:637: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:652: assert_invalid passed: error: type mismatch in loop, expected [] but got [i32] 0000020: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:643: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:658: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [] 0000020: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:649: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:664: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [i64] 0000022: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:656: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:671: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [] 000001f: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:662: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:677: assert_invalid passed: error: type mismatch in implicit return, expected [i32] but got [] 0000020: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:669: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:684: assert_invalid passed: error: type mismatch in function, expected [] but got [i32] 000001d: error: EndFunctionBody callback failed -out/test/spec/reference-types/unreached-invalid.wast:676: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:691: assert_invalid passed: error: type mismatch in block, expected [] but got [i32] 0000022: error: OnEndExpr callback failed -out/test/spec/reference-types/unreached-invalid.wast:687: assert_invalid passed: +out/test/spec/reference-types/unreached-invalid.wast:702: assert_invalid passed: error: type mismatch in i64.extend_i32_u, expected [i32] but got [i64] 000001c: error: OnConvertExpr callback failed -110/110 tests passed. +111/111 tests passed. ;;; STDOUT ;;) diff --git a/third_party/testsuite b/third_party/testsuite index c17cd7f4e..d2163dace 160000 --- a/third_party/testsuite +++ b/third_party/testsuite @@ -1 +1 @@ -Subproject commit c17cd7f4e379b814055c82fcc0fc1f6202ba9e2a +Subproject commit d2163dace09d647bccf34b9b82a6f05a3b23cf29