Commit 8c72792b authored by yangguo's avatar yangguo Committed by Commit bot

Mark function info as compiled after EnsureDeoptimizationSupport.

Note that prior to having canonical shared function infos, this has
been a source of duplicate shared function infos.

R=bmeurer@chromium.org
BUG=chromium:504787
LOG=N

Review URL: https://codereview.chromium.org/1209383002

Cr-Commit-Position: refs/heads/master@{#29326}
parent a845d3e5
......@@ -376,6 +376,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
}
DCHECK(info()->shared_info()->has_deoptimization_support());
DCHECK(!info()->is_first_compile());
// Check the enabling conditions for TurboFan.
bool dont_crankshaft = info()->shared_info()->dont_crankshaft();
......@@ -956,6 +957,8 @@ bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
shared->EnableDeoptimizationSupport(*unoptimized.code());
shared->set_feedback_vector(*unoptimized.feedback_vector());
info->MarkAsCompiled();
// The scope info might not have been set if a lazily compiled
// function is inlined before being called for the first time.
if (shared->scope_info() == ScopeInfo::Empty(info->isolate())) {
......
......@@ -249,6 +249,8 @@ class CompilationInfo {
void MarkAsFirstCompile() { SetFlag(kFirstCompile); }
void MarkAsCompiled() { SetFlag(kFirstCompile, false); }
bool is_first_compile() const { return GetFlag(kFirstCompile); }
bool IsCodePreAgingActive() const {
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --noturbo-osr
function f() {
"use asm";
function g() {
function f() {};
}
return g;
}
f()();
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