Commit 401fbc10 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Compiler] Remove HasAsmWasmData check from ShouldUseFullcodeGen.

We should never try to compile unoptimized code for a function with
AsmWasm data, since it either shouldn't have been created, or should be
cleared before we reach here, so remove the check.

Also change the check for optimizing using bytecode to be a check on
whether the function HasBytecode.

BUG=v8:5203, v8:6409

Change-Id: I472b123bb370f7929555e6162af02173834d01a1
Reviewed-on: https://chromium-review.googlesource.com/569969Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46677}
parent c7ac4269
......@@ -278,9 +278,6 @@ bool ShouldUseFullCodegen(Handle<SharedFunctionInfo> shared) {
// Use full-codegen for asm.js functions.
if (shared->asm_function()) return true;
// Use full-codegen for asm wasm code.
if (FLAG_validate_asm && shared->HasAsmWasmData()) return true;
// If stressing full-codegen then use it for all functions it can support.
return FLAG_stress_fullcodegen;
}
......@@ -847,8 +844,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode");
// TurboFan can optimize directly from existing bytecode.
if (!ShouldUseFullCodegen(info)) {
DCHECK(shared->HasBytecodeArray());
if (shared->HasBytecodeArray()) {
info->MarkAsOptimizeFromBytecode();
}
......
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