1f3a863bbd
This fixes {JSCreateLowering} to traverse boilerplate objects in the same order the runtime uses (i.e. properties first, elements second). That order is hard-coded in the nesting of {AllocationSite} objects. R=bmeurer@chromium.org TEST=mjsunit/regress/regress-crbug-709537 BUG=chromium:709537 Change-Id: I8f446a0880448ea88a3e242e92d11d611581a42b Reviewed-on: https://chromium-review.googlesource.com/474028 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#44563}
15 lines
377 B
JavaScript
15 lines
377 B
JavaScript
// Copyright 2017 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() {
|
|
return { 0: {}, x: {} };
|
|
}
|
|
var ref = foo();
|
|
assertEquals(ref, foo());
|
|
assertEquals(ref, foo());
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
assertEquals(ref, foo());
|