diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-05-01 23:41:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 06:41:27 +0000 |
commit | 2268f2a92524ef86e5b82f87ff4fdd20b5aff056 (patch) | |
tree | ed7d80737d81d712a497b94fff90ca88cc632681 /src/wasm-binary.h | |
parent | ba64ac3ed47cb35a477aaaf185679ae9d0b79862 (diff) | |
download | binaryen-2268f2a92524ef86e5b82f87ff4fdd20b5aff056.tar.gz binaryen-2268f2a92524ef86e5b82f87ff4fdd20b5aff056.tar.bz2 binaryen-2268f2a92524ef86e5b82f87ff4fdd20b5aff056.zip |
Update the type section binary format (#4625)
Print subtype declarations using the standards-track format with a vector of
supertypes followed by a normal type declaration rather than our interim nominal
format that used alternative versions of the func, struct, and array forms.
Desugar the nominal format to additionally emit all the types into a single
large recursion group. Currently V8 is performing this desugaring, but after
this change and a future change that fixes the order of nominal types to ensure
supertypes precede subtypes, it will no longer need to.
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 784321c33..d8225ce0f 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -379,13 +379,11 @@ enum EncodedType { // run-time type info type, without depth index n rtt = -0x18, // 0x68 dataref = -0x19, // 0x67 - // func_type form - Func = -0x20, // 0x60 - Struct = -0x21, // 0x5f - Array = -0x22, // 0x5e - FuncExtending = -0x23, // 0x5d - StructExtending = -0x24, // 0x5c - ArrayExtending = -0x25, // 0x5b + // type forms + Func = -0x20, // 0x60 + Struct = -0x21, // 0x5f + Array = -0x22, // 0x5e + Sub = -0x30, // 0x50 // isorecursive recursion groups Rec = -0x31, // 0x4f // block_type |