提交 a0737a0f 编写于 作者: M Matt Witherspoon

Make tabination of our hacks in WAVM match what the rest of it is written in

上级 ba5fb318
......@@ -212,10 +212,10 @@ namespace Runtime
// Gets the default table/memory for a ModuleInstance.
RUNTIME_API MemoryInstance* getDefaultMemory(ModuleInstance* moduleInstance);
RUNTIME_API uint64_t getDefaultMemorySize(ModuleInstance* moduleInstance);
RUNTIME_API uint64_t getDefaultMemorySize(ModuleInstance* moduleInstance);
RUNTIME_API TableInstance* getDefaultTable(ModuleInstance* moduleInstance);
RUNTIME_API void runInstanceStartFunc(ModuleInstance* moduleInstance);
RUNTIME_API void runInstanceStartFunc(ModuleInstance* moduleInstance);
// Gets an object exported by a ModuleInstance by name.
RUNTIME_API ObjectInstance* getInstanceExport(ModuleInstance* moduleInstance,const std::string& name);
......
......@@ -184,7 +184,7 @@ namespace Runtime
if(module.startFunctionIndex != UINTPTR_MAX)
{
assert(moduleInstance->functions[module.startFunctionIndex]->type == IR::FunctionType::get());
moduleInstance->startFunctionIndex = module.startFunctionIndex;
moduleInstance->startFunctionIndex = module.startFunctionIndex;
}
moduleInstances.push_back(moduleInstance);
......@@ -200,14 +200,14 @@ namespace Runtime
uint64_t getDefaultMemorySize(ModuleInstance* moduleInstance) { return moduleInstance->defaultMemory->numPages << IR::numBytesPerPageLog2; }
TableInstance* getDefaultTable(ModuleInstance* moduleInstance) { return moduleInstance->defaultTable; }
void runInstanceStartFunc(ModuleInstance* moduleInstance) {
if(moduleInstance->startFunctionIndex != UINTPTR_MAX)
invokeFunction(moduleInstance->functions[moduleInstance->startFunctionIndex],{});
}
void runInstanceStartFunc(ModuleInstance* moduleInstance) {
if(moduleInstance->startFunctionIndex != UINTPTR_MAX)
invokeFunction(moduleInstance->functions[moduleInstance->startFunctionIndex],{});
}
ObjectInstance* getInstanceExport(ModuleInstance* moduleInstance,const std::string& name)
{
auto mapIt = moduleInstance->exportMap.find(name);
return mapIt == moduleInstance->exportMap.end() ? nullptr : mapIt->second;
}
}
\ No newline at end of file
}
......@@ -118,7 +118,7 @@ namespace Runtime
LLVMJIT::JITModuleBase* jitModule;
Uptr startFunctionIndex = UINTPTR_MAX;
Uptr startFunctionIndex = UINTPTR_MAX;
ModuleInstance(
std::vector<FunctionInstance*>&& inFunctionImports,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册