Commit d3e7b48a authored by Victor Gomes's avatar Victor Gomes Committed by Commit Bot

[wasm] Disable safe_to_skip_adaptor optimization

This optimization does not work when the stack arguments are reversed.

Change-Id: Ib543e6ca234cc70708909e0b3cd474b1309ec40e
Bug: chromium:1126769, v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2404775
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69842}
parent 853efc77
...@@ -7072,10 +7072,14 @@ std::pair<WasmImportCallKind, Handle<JSReceiver>> ResolveWasmImportCall( ...@@ -7072,10 +7072,14 @@ std::pair<WasmImportCallKind, Handle<JSReceiver>> ResolveWasmImportCall(
Compiler::Compile(function, Compiler::CLEAR_EXCEPTION, Compiler::Compile(function, Compiler::CLEAR_EXCEPTION,
&is_compiled_scope); &is_compiled_scope);
} }
#ifndef V8_REVERSE_JSARGS
// This optimization is disabled when the arguments are reversed. It will be
// subsumed when the argumens adaptor frame is removed.
if (shared->is_safe_to_skip_arguments_adaptor()) { if (shared->is_safe_to_skip_arguments_adaptor()) {
return std::make_pair( return std::make_pair(
WasmImportCallKind::kJSFunctionArityMismatchSkipAdaptor, callable); WasmImportCallKind::kJSFunctionArityMismatchSkipAdaptor, callable);
} }
#endif
return std::make_pair(WasmImportCallKind::kJSFunctionArityMismatch, return std::make_pair(WasmImportCallKind::kJSFunctionArityMismatch,
callable); callable);
......
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