9c3dc33efe
SetForceInlineFlag is now only used in tests. Earlier, it was also used in js builtins, because unless this flag was specified the js builtins were not inlined. All the performance critical js builtins are moved to turbofan builtins and SetForceInlineFlag is no longer used. We would like to remove this flag completely to simplify inlining heuristics. Also, this uses a bit on the SharedFuntionInfo. Bug: v8:6682 Change-Id: I19afd27381afc212f29179f2c5477095c8174f39 Reviewed-on: https://chromium-review.googlesource.com/660739 Commit-Queue: Mythri Alle <mythria@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#47997}
24 lines
427 B
JavaScript
24 lines
427 B
JavaScript
// Copyright 2017 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 --stress-inline
|
|
|
|
function add(x) {
|
|
return x + x;
|
|
}
|
|
|
|
add(0);
|
|
add(1);
|
|
|
|
var min = Math.min;
|
|
function foo(x) {
|
|
x = x|0;
|
|
let y = add(x ? 800000000000 : NaN);
|
|
return min(y, x);
|
|
}
|
|
|
|
foo();
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|