diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-01-23 04:27:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 04:27:20 +0900 |
commit | 27a5a7101d20ce5fc51648e775587ab3d640114e (patch) | |
tree | bd8427f8b01a998d708847be0cfd08052b57a9ee /src/wasm-type.h | |
parent | 69952a98c7c86286518d559958e35cd3639bd3a0 (diff) | |
download | binaryen-27a5a7101d20ce5fc51648e775587ab3d640114e.tar.gz binaryen-27a5a7101d20ce5fc51648e775587ab3d640114e.tar.bz2 binaryen-27a5a7101d20ce5fc51648e775587ab3d640114e.zip |
Reorder i31ref and dataref (#3509)
The binary spec
(https://docs.google.com/document/d/1yAWU3dbs8kUa_wcnnirDxUu9nEBsNfq0Xo90OWx6yuo/edit#)
lists `dataref` after `i31ref`, and `dataref` also comes after `i31ref`
in its binary code in the value-increasing order. This reorders these
two in wasm-type.h and other places, although in most of those places
the order is irrelevant.
This also adds C and JS API for `dataref`.
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r-- | src/wasm-type.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index 6b3fdb08f..bf3dd69de 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -74,10 +74,10 @@ public: externref, anyref, eqref, - dataref, i31ref, + dataref, }; - static constexpr BasicType _last_basic_type = i31ref; + static constexpr BasicType _last_basic_type = dataref; Type() : id(none) {} @@ -295,10 +295,10 @@ public: ext, any, eq, - data, i31, + data, }; - static constexpr BasicHeapType _last_basic_type = i31; + static constexpr BasicHeapType _last_basic_type = data; // BasicHeapType can be implicitly upgraded to HeapType constexpr HeapType(BasicHeapType id) : id(id) {} |