| Index: src/compiler/wasm-compiler.cc
|
| diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
|
| index fcd330619cf251200d3c7a87d93dd19ab4bf26cc..2af6632c277eab58cda60108460682d1df22d744 100644
|
| --- a/src/compiler/wasm-compiler.cc
|
| +++ b/src/compiler/wasm-compiler.cc
|
| @@ -2549,11 +2549,11 @@ Node* WasmGraphBuilder::FunctionTable() {
|
| }
|
|
|
| Node* WasmGraphBuilder::LoadGlobal(uint32_t index) {
|
| - DCHECK(module_ && module_->instance && module_->instance->globals_start);
|
| MachineType mem_type = module_->GetGlobalType(index);
|
| - Node* addr = jsgraph()->IntPtrConstant(
|
| + Node* addr = jsgraph()->RelocatableIntPtrConstant(
|
| reinterpret_cast<uintptr_t>(module_->instance->globals_start +
|
| - module_->module->globals[index].offset));
|
| + module_->module->globals[index].offset),
|
| + RelocInfo::WASM_GLOBAL_REFERENCE);
|
| const Operator* op = jsgraph()->machine()->Load(mem_type);
|
| Node* node = graph()->NewNode(op, addr, jsgraph()->Int32Constant(0), *effect_,
|
| *control_);
|
| @@ -2562,11 +2562,11 @@ Node* WasmGraphBuilder::LoadGlobal(uint32_t index) {
|
| }
|
|
|
| Node* WasmGraphBuilder::StoreGlobal(uint32_t index, Node* val) {
|
| - DCHECK(module_ && module_->instance && module_->instance->globals_start);
|
| MachineType mem_type = module_->GetGlobalType(index);
|
| - Node* addr = jsgraph()->IntPtrConstant(
|
| + Node* addr = jsgraph()->RelocatableIntPtrConstant(
|
| reinterpret_cast<uintptr_t>(module_->instance->globals_start +
|
| - module_->module->globals[index].offset));
|
| + module_->module->globals[index].offset),
|
| + RelocInfo::WASM_GLOBAL_REFERENCE);
|
| const Operator* op = jsgraph()->machine()->Store(
|
| StoreRepresentation(mem_type.representation(), kNoWriteBarrier));
|
| Node* node = graph()->NewNode(op, addr, jsgraph()->Int32Constant(0), val,
|
|
|