Commit e60d8600 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm] Add GenericJSToWasmWrapper to the list of executable builtins

Ensure that a valid off-heap trampoline is created for the
GenericJSToWasmWrapper builtin by adding it to the list of executable
builtins.

R=ahaas@chromium.org
CC=​evih@chromium.org

Bug: v8:10701
Change-Id: I49b8144237aca20f5f663c7b32810a16f715ad5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2438415
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70218}
parent 30c0326a
......@@ -484,6 +484,7 @@ bool Builtins::CodeObjectIsExecutable(int builtin_index) {
case Builtins::kArgumentsAdaptorTrampoline:
case Builtins::kHandleApiCall:
case Builtins::kInstantiateAsmJs:
case Builtins::kGenericJSToWasmWrapper:
// TODO(delphick): Remove this when calls to it have the trampoline inlined
// or are converted to use kCallBuiltinPointer.
......
......@@ -730,6 +730,23 @@ let kSig_f_iiliiiffddlifffdi = makeSig([kWasmI32, kWasmI32, kWasmI64, kWasmI32,
assertEquals(360, x);
})();
(function testCallFromOptimizedFunction() {
print(arguments.callee.name);
const builder = new WasmModuleBuilder();
builder.addFunction('wasm_fn', kSig_v_v).addBody([
kExprNop,
]).exportFunc();
instance = builder.instantiate();
function js_caller() {
return instance.exports.wasm_fn();
}
%PrepareFunctionForOptimization(js_caller);
js_caller();
%OptimizeFunctionOnNextCall(js_caller);
js_caller();
})();
(function Regression1130385() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
......
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