summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 659e0f58b..3b3fa30f6 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -375,8 +375,13 @@ enum EncodedType {
// run-time type info type, with depth index n
rtt_n = -0x17, // 0x69
// run-time type info type, without depth index n
- rtt = -0x18, // 0x68
- dataref = -0x19, // 0x67
+ rtt = -0x18, // 0x68
+ // gc and string reference types
+ dataref = -0x19, // 0x67
+ stringref = -0x1c, // 0x64
+ stringview_wtf8 = -0x1d, // 0x63
+ stringview_wtf16 = -0x1e, // 0x62
+ stringview_iter = -0x1f, // 0x61
// type forms
Func = -0x20, // 0x60
Struct = -0x21, // 0x5f
@@ -393,11 +398,18 @@ enum EncodedType {
};
enum EncodedHeapType {
- func = -0x10, // 0x70
- any = -0x11, // 0x6f
- eq = -0x13, // 0x6d
- i31 = -0x16, // 0x6a
- data = -0x19, // 0x67
+ func = -0x10, // 0x70
+ any = -0x11, // 0x6f
+ eq = -0x13, // 0x6d
+ i31 = -0x16, // 0x6a
+ data = -0x19, // 0x67
+ string = -0x1c, // 0x64
+ // stringview/iter constants are identical to type, and cannot be duplicated
+ // here as that would be a compiler error, so add _heap suffixes. See
+ // https://github.com/WebAssembly/stringref/issues/12
+ stringview_wtf8_heap = -0x1d, // 0x63
+ stringview_wtf16_heap = -0x1e, // 0x62
+ stringview_iter_heap = -0x1f, // 0x61
};
namespace UserSections {