a7e5504d83
Unfortunately, we still have to keep the field because GC mole and Torque do not support platform specific padding well (see http://crbug.com/v8/9287). Bug: v8:9183 Change-Id: I2210be4b8174c97bc82145605f9b862aac3bdc37 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624791 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#61802}
30 lines
626 B
JavaScript
30 lines
626 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 --opt --no-always-opt
|
|
|
|
function foo(i, deopt = false) {
|
|
if (i == 0) {
|
|
if (deopt) {
|
|
// Trigger an eager deopt.
|
|
%_DeoptimizeNow();
|
|
}
|
|
} else {
|
|
foo(i - 1, deopt);
|
|
}
|
|
}
|
|
%PrepareFunctionForOptimization(foo);
|
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
foo(10);
|
|
foo(10);
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo(10);
|
|
|
|
assertOptimized(foo);
|
|
|
|
foo(10, true);
|
|
|
|
assertUnoptimized(foo);
|