Commit 279cbe86 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Remove unneeded js-to-wasm parameter

js-to-wasm wrappers check whether trap handlers are enabled
process-wide, but are independent of their actual usage in the current
instance. Thus remove this unneeded parameter.

R=mstarzinger@chromium.org

Bug: chromium:862123
Change-Id: I3793213864568b4e26eb3414239033491e4539f5
Reviewed-on: https://chromium-review.googlesource.com/1226974
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55961}
parent 5b3fc956
......@@ -4796,8 +4796,7 @@ void AppendSignature(char* buffer, size_t max_name_len,
MaybeHandle<Code> CompileJSToWasmWrapper(
Isolate* isolate, const wasm::NativeModule* native_module,
wasm::FunctionSig* sig, bool is_import,
wasm::UseTrapHandler use_trap_handler) {
wasm::FunctionSig* sig, bool is_import) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"),
"CompileJSToWasmWrapper");
const wasm::WasmModule* module = native_module->module();
......@@ -4817,7 +4816,8 @@ MaybeHandle<Code> CompileJSToWasmWrapper(
Node* control = nullptr;
Node* effect = nullptr;
wasm::ModuleEnv env(module, use_trap_handler, wasm::kRuntimeExceptionSupport);
wasm::ModuleEnv env(module, wasm::kNoTrapHandler,
wasm::kRuntimeExceptionSupport);
WasmWrapperGraphBuilder builder(&zone, &env, &jsgraph, sig, nullptr,
StubCallMode::kCallOnHeapBuiltin);
builder.set_control_ptr(&control);
......
......@@ -76,11 +76,8 @@ MaybeHandle<Code> CompileWasmToJSWrapper(Isolate*, Handle<JSReceiver> target,
// Creates a code object calling a wasm function with the given signature,
// callable from JS.
// TODO(clemensh): Remove the {UseTrapHandler} parameter to make js-to-wasm
// wrappers sharable across instances.
V8_EXPORT_PRIVATE MaybeHandle<Code> CompileJSToWasmWrapper(
Isolate*, const wasm::NativeModule*, wasm::FunctionSig*, bool is_import,
wasm::UseTrapHandler);
Isolate*, const wasm::NativeModule*, wasm::FunctionSig*, bool is_import);
// Compiles a stub that redirects a call to a wasm function to the wasm
// interpreter. It's ABI compatible with the compiled wasm function.
......
......@@ -191,10 +191,9 @@ class JSToWasmWrapperCache {
Handle<Code>& cached = cache_[key];
if (!cached.is_null()) return cached;
Handle<Code> code =
compiler::CompileJSToWasmWrapper(isolate, native_module, func->sig,
is_import, use_trap_handler)
.ToHandleChecked();
Handle<Code> code = compiler::CompileJSToWasmWrapper(isolate, native_module,
func->sig, is_import)
.ToHandleChecked();
cached = code;
return code;
}
......
......@@ -123,9 +123,8 @@ Handle<JSFunction> TestingModuleBuilder::WrapCode(uint32_t index) {
// Wrap the code so it can be called as a JS function.
Link();
FunctionSig* sig = test_module_->functions[index].sig;
MaybeHandle<Code> maybe_ret_code = compiler::CompileJSToWasmWrapper(
isolate_, native_module_, sig, false,
trap_handler::IsTrapHandlerEnabled() ? kUseTrapHandler : kNoTrapHandler);
MaybeHandle<Code> maybe_ret_code =
compiler::CompileJSToWasmWrapper(isolate_, native_module_, sig, false);
Handle<Code> ret_code = maybe_ret_code.ToHandleChecked();
Handle<JSFunction> ret = WasmExportedFunction::New(
isolate_, instance_object(), MaybeHandle<String>(),
......
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