v8/test/mjsunit/compiler/regress-1239601.js
Georg Neis 78ffa51209 [compiler] Fix a bug concerning PropertyAccessInfo
Don't create DataField and FastDataConstant access infos with a kNone
field representation. Instead return Invalid.

Bug: chromium:1239601
Change-Id: I4df7aa298974f9dcd650ead50aaa349c84feb487
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097463
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76343}
2021-08-17 12:21:54 +00:00

25 lines
507 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
function foo() {
const a = {};
const b = [];
const unused = {__proto__: [], p1: a, p2: 0, p3: 0, p4: 0};
function inline(x) { x.gaga; }
inline(a);
inline(b);
b.p1 = 42;
}
%PrepareFunctionForOptimization(foo);
for (var i = 0; i < 10; i++) foo();
%OptimizeFunctionOnNextCall(foo);
foo();