Commit b5203e8f authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Remove more obsolete DCHECKs

This time for the current memory size. This call also used to use the
context object stored in the instance, hence it required the instance
to be set. This is no longer the case, so the DCHECKs can just be
removed.

R=ahaas@chromium.org
BUG=chromium:727222

Change-Id: I72a7e3e80c3beb15ecad00c5be068e803456797e
Reviewed-on: https://chromium-review.googlesource.com/517947Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45587}
parent 959c569f
......@@ -2896,11 +2896,8 @@ Node* WasmGraphBuilder::MemBuffer(uint32_t offset) {
}
Node* WasmGraphBuilder::CurrentMemoryPages() {
// CurrentMemoryPages will not be called from asm.js, hence we cannot be in
// lazy-compilation mode, hence the instance will be set.
// CurrentMemoryPages can not be called from asm.js.
DCHECK_EQ(wasm::kWasmOrigin, module_->module->get_origin());
DCHECK_NOT_NULL(module_);
DCHECK_NOT_NULL(module_->instance);
Node* call = BuildCallToRuntime(Runtime::kWasmMemorySize, jsgraph(), nullptr,
0, effect_, control_);
Node* result = BuildChangeSmiToInt32(call);
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('test/mjsunit/wasm/wasm-constants.js');
load('test/mjsunit/wasm/wasm-module-builder.js');
var builder = new WasmModuleBuilder();
builder.addMemory(0, 0, false);
builder.addFunction('f', kSig_i_v)
.addBody([kExprMemorySize, kMemoryZero])
.exportFunc();
var instance = builder.instantiate();
instance.exports.f();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment