MCPcopy Create free account
hub / github.com/WebAssembly/wabt / GetModule

Method GetModule

src/ir.cc:587–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587const Module* Script::GetModule(const Var& var) const {
588 Index index = module_bindings.FindIndex(var);
589 if (index >= commands.size()) {
590 return nullptr;
591 }
592 auto* command = commands[index].get();
593 if (isa<ModuleCommand>(command)) {
594 return &cast<ModuleCommand>(command)->module;
595 } else if (isa<ScriptModuleCommand>(command)) {
596 return &cast<ScriptModuleCommand>(command)->module;
597 }
598 return nullptr;
599}
600
601void MakeTypeBindingReverseMapping(
602 size_t num_types,

Callers 3

CheckInvokeMethod · 0.80
CheckGetMethod · 0.80
WriteActionResultTypeMethod · 0.80

Calls 3

FindIndexMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by 1

WriteActionResultTypeMethod · 0.64