diff options
author | Ben Smith <binji@chromium.org> | 2020-05-28 11:30:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 11:30:38 -0700 |
commit | bf46c08b05fc6fcc457f1657e936fab24b4dceee (patch) | |
tree | f57a19c670a3e222896c252c829d5eb5ec4db6d2 /src/binary-reader.h | |
parent | 0630dc53755678239d7609b61776b125221eefb8 (diff) | |
download | wabt-bf46c08b05fc6fcc457f1657e936fab24b4dceee.tar.gz wabt-bf46c08b05fc6fcc457f1657e936fab24b4dceee.tar.bz2 wabt-bf46c08b05fc6fcc457f1657e936fab24b4dceee.zip |
Reference types changes to remove subtyping (#1407)
Main changes:
* Rename `anyref` -> `externref`
* Remove `nullref`
* Rename `hostref` -> `externref`
* `ref.null` and `ref.is_null` now have "ref kind" parameter
* Add ref kind keywords: `func`, `extern`, `exn`
Diffstat (limited to 'src/binary-reader.h')
-rw-r--r-- | src/binary-reader.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/binary-reader.h b/src/binary-reader.h index 405387ba..eae1e87d 100644 --- a/src/binary-reader.h +++ b/src/binary-reader.h @@ -199,6 +199,7 @@ class BinaryReaderDelegate { virtual Result OnOpcodeF64(uint64_t value) = 0; virtual Result OnOpcodeV128(v128 value) = 0; virtual Result OnOpcodeBlockSig(Type sig_type) = 0; + virtual Result OnOpcodeType(Type type) = 0; virtual Result OnAtomicLoadExpr(Opcode opcode, uint32_t alignment_log2, Address offset) = 0; @@ -265,8 +266,8 @@ class BinaryReaderDelegate { virtual Result OnTableSizeExpr(Index table_index) = 0; virtual Result OnTableFillExpr(Index table_index) = 0; virtual Result OnRefFuncExpr(Index func_index) = 0; - virtual Result OnRefNullExpr() = 0; - virtual Result OnRefIsNullExpr() = 0; + virtual Result OnRefNullExpr(Type type) = 0; + virtual Result OnRefIsNullExpr(Type type) = 0; virtual Result OnNopExpr() = 0; virtual Result OnRethrowExpr() = 0; virtual Result OnReturnExpr() = 0; @@ -304,7 +305,8 @@ class BinaryReaderDelegate { virtual Result EndElemSegmentInitExpr(Index index) = 0; virtual Result OnElemSegmentElemType(Index index, Type elem_type) = 0; virtual Result OnElemSegmentElemExprCount(Index index, Index count) = 0; - virtual Result OnElemSegmentElemExpr_RefNull(Index segment_index) = 0; + virtual Result OnElemSegmentElemExpr_RefNull(Index segment_index, + Type type) = 0; virtual Result OnElemSegmentElemExpr_RefFunc(Index segment_index, Index func_index) = 0; virtual Result EndElemSegment(Index index) = 0; @@ -425,7 +427,7 @@ class BinaryReaderDelegate { virtual Result OnInitExprGlobalGetExpr(Index index, Index global_index) = 0; virtual Result OnInitExprI32ConstExpr(Index index, uint32_t value) = 0; virtual Result OnInitExprI64ConstExpr(Index index, uint64_t value) = 0; - virtual Result OnInitExprRefNull(Index index) = 0; + virtual Result OnInitExprRefNull(Index index, Type type) = 0; virtual Result OnInitExprRefFunc(Index index, Index func_index) = 0; const State* state = nullptr; |