source: trip-planner-front/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

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