8ab555cc15
This fixes canonicalization of {SharedFunctionInfo} objects in the {Compiler::GetSharedFunctionInfo} method when bytecode is preserved. Eager compilation is only triggered when no code is present. R=rmcilroy@chromium.org TEST=mjsunit/regress/regress-crbug-638551 BUG=chromium:638551 Review-Url: https://codereview.chromium.org/2245263006 Cr-Commit-Position: refs/heads/master@{#38709}
19 lines
510 B
JavaScript
19 lines
510 B
JavaScript
// Copyright 2016 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: --allow-natives-syntax --expose-gc --ignition-staging --no-lazy
|
|
|
|
function f() {
|
|
for (var i = 0; i < 10; i++) if (i == 5) %OptimizeOsr();
|
|
function g() {}
|
|
%OptimizeFunctionOnNextCall(g);
|
|
g();
|
|
}
|
|
f();
|
|
gc(); // Make sure that ...
|
|
gc(); // ... code flushing ...
|
|
gc(); // ... clears code ...
|
|
gc(); // ... attached to {g}.
|
|
f();
|