7915cf939e
Commit 26c00f4a4c
improved the names of
most FAST_* elements kinds in the enum. This patch updates the matching
Has*Elements and Is*ElementsKind method names accordingly.
- HasFastSmiElements => HasSmiElements
- IsFastSmiElementsKind => IsSmiElementsKind
- HasFastObjectElements => HasObjectElements
- IsFastObjectElementsKind => IsObjectElementsKind
- HasFastSmiOrObjectElements => HasSmiOrObjectElements
- IsFastSmiOrObjectElementsKind => IsSmiOrObjectElementsKind
- HasFastDoubleElements => HasDoubleElements
- IsFastDoubleElementsKind => IsDoubleElementsKind
- HasFastHoleyElements => HasHoleyElements
- IsFastHoleyElementsKind => IsHoleyElementsKind
Additionally, FastHoleyElementsUsage is renamed to HoleyElementsUsage.
BUG=v8:6548
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie8f3d01eb43e909cbc6c372d88c5fbc4dfc2ac04
Reviewed-on: https://chromium-review.googlesource.com/558356
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46376}
34 lines
684 B
JavaScript
34 lines
684 B
JavaScript
// Copyright 2015 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 --expose-gc
|
|
|
|
var inner = new Array();
|
|
inner.a = {x:1};
|
|
inner[0] = 1.5;
|
|
inner.b = {x:2};
|
|
assertTrue(%HasDoubleElements(inner));
|
|
|
|
function foo(o) {
|
|
return o.field.b.x;
|
|
}
|
|
|
|
var outer = {};
|
|
outer.field = inner;
|
|
foo(outer);
|
|
foo(outer);
|
|
foo(outer);
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo(outer);
|
|
|
|
// Generalize representation of field "b" of inner object.
|
|
var v = { get x() { return 0x7fffffff; } };
|
|
inner.b = v;
|
|
|
|
gc();
|
|
|
|
var boom = foo(outer);
|
|
print(boom);
|
|
assertEquals(0x7fffffff, boom);
|