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:
parent
a845d3e552
commit
8c72792b6d
@ -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 {
|
||||
|
15
test/mjsunit/regress/regress-crbug-504787.js
Normal file
15
test/mjsunit/regress/regress-crbug-504787.js
Normal 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()();
|
Loading…
Reference in New Issue
Block a user