2c5f11fba2
This uses the same comparison as the ICs to make sure that ICs learn after deoptimization (see https://chromium-review.googlesource.com/c/v8/v8/+/1561319 for the IC fix). Bug: v8:9139 Change-Id: I67a361d85ee0c8a4ad4a6abc2d33ac4ca5fa22bc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1569438 Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#60917}
21 lines
453 B
JavaScript
21 lines
453 B
JavaScript
// Copyright 2019 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
|
|
|
|
let dummy = { x : {} };
|
|
|
|
let o = { x : 0.1 };
|
|
|
|
function f(o, a, b) {
|
|
o.x = a + b;
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(f);
|
|
f(o, 0.05, 0.05);
|
|
f(o, 0.05, 0.05);
|
|
%OptimizeFunctionOnNextCall(f);
|
|
f(o, 0.05, 0.05);
|
|
assertOptimized(f);
|