v8/test/mjsunit/compiler/regress-crbug-1323114.js
Tobias Tebbi b209cdf5bb [compiler] add test for crbug-1323114
This is a follow-up to
https://chromium-review.googlesource.com/c/v8/v8/+/3630081

Bug: chromium:1323114
Change-Id: Ie6e3cbdecf370c5fdf9544c2f47f7b4f8f27bd70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647826
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80550}
2022-05-16 11:50:56 +00:00

20 lines
454 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 f() {
const a = {'x': 5};
a.x = {};
Object.freeze(a);
return Object.is(a.x, 5)
}
%PrepareFunctionForOptimization(f);
assertFalse(f());
assertFalse(f());
%OptimizeFunctionOnNextCall(f);
assertFalse(f());
assertOptimized(f);