Index: src/compiler/wasm-compiler.cc |
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc |
index b003e9968aca0a218ae7a6f9d11db072c80c1e99..dac9eec7a75a9ee22c49e7ee7ec114822a7f86ef 100644 |
--- a/src/compiler/wasm-compiler.cc |
+++ b/src/compiler/wasm-compiler.cc |
@@ -2759,27 +2759,8 @@ |
} |
Node* WasmGraphBuilder::CurrentMemoryPages() { |
- Runtime::FunctionId function_id = Runtime::kWasmMemorySize; |
- const Runtime::Function* function = Runtime::FunctionForId(function_id); |
- CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor( |
- jsgraph()->zone(), function_id, function->nargs, Operator::kNoThrow, |
- CallDescriptor::kNoFlags); |
- wasm::ModuleEnv* module = module_; |
- Node* inputs[] = { |
- jsgraph()->CEntryStubConstant(function->result_size), // C entry |
- jsgraph()->ExternalConstant( |
- ExternalReference(function_id, jsgraph()->isolate())), // ref |
- jsgraph()->Int32Constant(function->nargs), // arity |
- jsgraph()->HeapConstant(module->instance->context), // context |
- *effect_, |
- *control_}; |
- Node* call = graph()->NewNode(jsgraph()->common()->Call(desc), |
- static_cast<int>(arraysize(inputs)), inputs); |
- |
- Node* result = BuildChangeSmiToInt32(call); |
- |
- *effect_ = call; |
- return result; |
+ return graph()->NewNode(jsgraph()->machine()->Word32Shr(), MemSize(0), |
+ jsgraph()->Int32Constant(16)); |
} |
Node* WasmGraphBuilder::MemSize(uint32_t offset) { |