8dbd587446
Bug: v8:12619, chromium:1380337 Change-Id: I6395b69daec9fdd5929505e8425ceb90ab33a7c6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4003157 Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Darius Mercadier <dmercadier@chromium.org> Cr-Commit-Position: refs/heads/main@{#84062}
20 lines
476 B
JavaScript
20 lines
476 B
JavaScript
// Copyright 2022 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 --turbofan
|
|
|
|
function foo() {
|
|
var a = { x: 2 };
|
|
var confused = 0;
|
|
confused += (a.x < 6);
|
|
confused = (confused-1)
|
|
return confused
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
print(foo());
|
|
print(foo());
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
print(foo());
|