MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / executeMainFile

Method executeMainFile

Source/Wasm/WasmRuntime.cpp:2317–2334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2315}
2316
2317bool WasmRuntime::executeMainFile(String filename) {
2318 if (!_scheduler) {
2319 scheduleUpdate();
2320 }
2321 auto instance = New<WasmInstance>();
2322 auto moduleId = allocModuleId(instance.get());
2323 if (moduleId == 0) {
2324 Error("failed to allocate wasm module id for {}", filename.toString());
2325 return false;
2326 }
2327 instance->setModuleId(moduleId);
2328 if (instance->executeMainFile(filename)) {
2329 _instances.push_back(std::move(instance));
2330 return true;
2331 }
2332 releaseModuleId(instance->getModuleId());
2333 return false;
2334}
2335
2336bool WasmInstance::executeMainFile(String filename) {
2337 if (_wasm.first || _loading) {

Callers

nothing calls this directly

Calls 15

moveFunction · 0.85
linkDoraModuleFunction · 0.85
VersionToStrFunction · 0.85
setModuleIdMethod · 0.80
getModuleIdMethod · 0.80
new_runtimeMethod · 0.80
set_userdataMethod · 0.80
parse_moduleMethod · 0.80
link_defaultMethod · 0.80
find_functionMethod · 0.80
call_argvMethod · 0.80
get_error_messageMethod · 0.80

Tested by

no test coverage detected