diff options
author | Alon Zakai <azakai@google.com> | 2023-05-04 16:44:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 16:44:09 -0700 |
commit | 7f8e4cbf6273c9b13b3a1a42f5e2833ea0d0f686 (patch) | |
tree | cc0343495b994c67a01b5143e6345d45a1c3587d /src/wasm2js.h | |
parent | 09fe432c0d3cb7562767a8e06d4e918beb5990c2 (diff) | |
download | binaryen-7f8e4cbf6273c9b13b3a1a42f5e2833ea0d0f686.tar.gz binaryen-7f8e4cbf6273c9b13b3a1a42f5e2833ea0d0f686.tar.bz2 binaryen-7f8e4cbf6273c9b13b3a1a42f5e2833ea0d0f686.zip |
[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
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r-- | src/wasm2js.h | 12 |
1 files changed, 10 insertions, 2 deletions
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"); } |