您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

section.js 515B

12345678910111213141516171819202122232425262728293031
  1. export function getSectionForNode(n) {
  2. switch (n.type) {
  3. case "ModuleImport":
  4. return "import";
  5. case "CallInstruction":
  6. case "CallIndirectInstruction":
  7. case "Func":
  8. case "Instr":
  9. return "code";
  10. case "ModuleExport":
  11. return "export";
  12. case "Start":
  13. return "start";
  14. case "TypeInstruction":
  15. return "type";
  16. case "IndexInFuncSection":
  17. return "func";
  18. case "Global":
  19. return "global";
  20. // No section
  21. default:
  22. return;
  23. }
  24. }