source: imaps-frontend/node_modules/@webassemblyjs/helper-wasm-bytecode/esm/section.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 515 bytes
Line 
1export function getSectionForNode(n) {
2 switch (n.type) {
3 case "ModuleImport":
4 return "import";
5
6 case "CallInstruction":
7 case "CallIndirectInstruction":
8 case "Func":
9 case "Instr":
10 return "code";
11
12 case "ModuleExport":
13 return "export";
14
15 case "Start":
16 return "start";
17
18 case "TypeInstruction":
19 return "type";
20
21 case "IndexInFuncSection":
22 return "func";
23
24 case "Global":
25 return "global";
26 // No section
27
28 default:
29 return;
30 }
31}
Note: See TracBrowser for help on using the repository browser.