6f9b389b39
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}
28 lines
516 B
JavaScript
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();
|