From 7f8e4cbf6273c9b13b3a1a42f5e2833ea0d0f686 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 4 May 2023 16:44:09 -0700 Subject: [NFC] Refactor each of ArrayNewSeg and ArrayInit into subclasses for Data/Elem (#5692) ArrayNewSeg => ArrayNewSegData, ArrayNewSegElem ArrayInit => ArrayInitData, ArrayInitElem Basically we remove the opcode and use the class type to differentiate them. This adds some code but it makes the representation simpler and more compact in memory, and it will help with #5690 --- src/wasm2js.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/wasm2js.h') diff --git a/src/wasm2js.h b/src/wasm2js.h index d33e45c4c..e12749836 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -2315,7 +2315,11 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m, unimplemented(curr); WASM_UNREACHABLE("unimp"); } - Ref visitArrayNewSeg(ArrayNewSeg* curr) { + Ref visitArrayNewData(ArrayNewData* curr) { + unimplemented(curr); + WASM_UNREACHABLE("unimp"); + } + Ref visitArrayNewElem(ArrayNewElem* curr) { unimplemented(curr); WASM_UNREACHABLE("unimp"); } @@ -2343,7 +2347,11 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m, unimplemented(curr); WASM_UNREACHABLE("unimp"); } - Ref visitArrayInit(ArrayInit* curr) { + Ref visitArrayInitData(ArrayInitData* curr) { + unimplemented(curr); + WASM_UNREACHABLE("unimp"); + } + Ref visitArrayInitElem(ArrayInitElem* curr) { unimplemented(curr); WASM_UNREACHABLE("unimp"); } -- cgit v1.2.3