Commit f8b89839 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Compiler] Don't mark asm-wasm functions for optimization in PostInstantiation.

Functions with asm-wasm data shouldn't be marked for optimization, since
they will be optimized using the asm-wasm data instead.

Review-Url: https://codereview.chromium.org/2537103002
Cr-Commit-Position: refs/heads/master@{#41367}
parent 5e8b2b80
......@@ -1193,9 +1193,11 @@ MaybeHandle<JSArray> Compiler::CompileForLiveEdit(Handle<Script> script) {
bool Compiler::EnsureBytecode(CompilationInfo* info) {
if (!info->shared_info()->is_compiled()) {
if (GetUnoptimizedCode(info).is_null()) return false;
if (info->shared_info()->HasAsmWasmData()) return false;
}
DCHECK(info->shared_info()->is_compiled());
if (info->shared_info()->HasAsmWasmData()) return false;
DCHECK_EQ(ShouldUseIgnition(info), info->shared_info()->HasBytecodeArray());
return info->shared_info()->HasBytecodeArray();
}
......@@ -1711,6 +1713,7 @@ void Compiler::PostInstantiation(Handle<JSFunction> function,
Handle<SharedFunctionInfo> shared(function->shared());
if (FLAG_always_opt && shared->allows_lazy_compilation() &&
!function->shared()->HasAsmWasmData() &&
function->shared()->is_compiled()) {
function->MarkForOptimization();
}
......
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