v8/test/mjsunit/regress/regress-1225561.js
Ross McIlroy 6f9b389b39 [Turboprop] Fix Arm64 dynamic map deoptimization.
BUG=chromium:1225561

Change-Id: Ia81127e489b6e790d20f73f7a4a047b6808eb81d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001177
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75536}
2021-07-02 16:29:18 +00:00

28 lines
516 B
JavaScript

// Copyright 2021 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 --turboprop --turbo-dynamic-map-checks
function bar(obj) {
return Object.getPrototypeOf(obj);
}
function foo(a, b) {
try {
a.a;
} catch (e) {}
try {
b[bar()] = 1;
} catch (e) {}
}
var arg = {
a: 10,
};
%PrepareFunctionForOptimization(foo);
foo(arg);
%OptimizeFunctionOnNextCall(foo);
foo();