Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Runtime/Library/WasmLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ namespace Js
Assert(sourceGlobal->GetReferenceType() != Wasm::WasmGlobal::ImportedReference); //no imported globals at this point
if (sourceGlobal->GetReferenceType() != Wasm::WasmGlobal::Const)
{
throw Wasm::WasmCompilationException(_u("Global %d is initialized with global %d "
"which is not a const. Forward references aren't supported!"), i, global->var.num);
throw Wasm::WasmCompilationException(_u("Global %d is initialized with global %d ")
_u("which is not a const. Forward references aren't supported!"), i, global->var.num);
}
global->SetReferenceType(Wasm::WasmGlobal::Const); //resolve global to const
global->cnst = sourceGlobal->cnst;
Expand Down
3 changes: 2 additions & 1 deletion lib/WasmReader/WasmModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ WasmModule::WasmModule(Js::ScriptContext* scriptContext, byte* binaryBuffer, uin
heapOffset(0),
funcOffset(0),
importFuncOffset(0),
globalCounts {0, 0, 0, 0, 0}, //the first elm is the number of Vars in front of I32; makes for a nicer offset computation
globals (&m_alloc)
{
//the first elm is the number of Vars in front of I32; makes for a nicer offset computation
memset(globalCounts, 0, sizeof( uint ) * WasmTypes::Limit);
m_reader = Anew(&m_alloc, WasmBinaryReader, &m_alloc, this, binaryBuffer, binaryBufferLength);
m_reader->InitializeReader();
}
Expand Down