v8/test/mjsunit/regress/regress-crbug-608278.js
Mythri 9c3dc33efe Remove SetForceInlineFlag from tests.
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}
2017-09-13 15:31:44 +00:00

62 lines
877 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 --stress-inline
"use strict";
function h() {
var stack = (new Error("boom")).stack;
print(stack);
%DeoptimizeFunction(f1);
%DeoptimizeFunction(f2);
%DeoptimizeFunction(f3);
%DeoptimizeFunction(g);
%DeoptimizeFunction(h);
return 1;
}
%NeverOptimizeFunction(h);
function g(v) {
return h();
}
function f1() {
var o = {};
o.__defineGetter__('p', g);
o.p;
}
f1();
f1();
%OptimizeFunctionOnNextCall(f1);
f1();
function f2() {
var o = {};
o.__defineSetter__('q', g);
o.q = 1;
}
f2();
f2();
%OptimizeFunctionOnNextCall(f2);
f2();
function A() {
return h();
}
function f3() {
new A();
}
f3();
f3();
%OptimizeFunctionOnNextCall(f3);
f3();