From 675295888609a688ee81dc9ad2024169da5aa7ed Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 23 Sep 2021 12:36:17 -0700 Subject: [Wasm GC] Implement static (rtt-free) StructNew, ArrayNew, ArrayInit (#4172) See #4149 This modifies the test added in #4163 which used static casts on dynamically-created structs and arrays. That was technically not valid (as we won't want users to "mix" the two forms). This makes that test 100% static, which both fixes the test and gives test coverage to the new instructions added here. --- src/wasm-binary.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 0e4b4b873..057a2a981 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1052,6 +1052,8 @@ enum ASTNodes { StructGetS = 0x04, StructGetU = 0x05, StructSet = 0x06, + StructNew = 0x07, + StructNewDefault = 0x08, ArrayNewWithRtt = 0x11, ArrayNewDefaultWithRtt = 0x12, ArrayGet = 0x13, @@ -1061,6 +1063,9 @@ enum ASTNodes { ArrayLen = 0x17, ArrayCopy = 0x18, ArrayInit = 0x19, + ArrayInitStatic = 0x1a, + ArrayNew = 0x1b, + ArrayNewDefault = 0x1c, I31New = 0x20, I31GetS = 0x21, I31GetU = 0x22, -- cgit v1.2.3