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}
This commit is contained in:
yangguo 2015-06-26 06:16:57 -07:00 committed by Commit bot
parent a845d3e552
commit 8c72792b6d
3 changed files with 20 additions and 0 deletions

View File

@ -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())) {

View File

@ -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 {

View File

@ -0,0 +1,15 @@
// 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()();