Commit 214992e2 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

Remove obsolete array constructor test

The test says that it is testing dictionary mode, but it is only
creating fast mode arrays.

Bug: chromium:852420
Change-Id: I99ccc997aaa87ecf49bddf02e46b7e543f535374
Reviewed-on: https://chromium-review.googlesource.com/c/1462918Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59504}
parent 0544466c
......@@ -92,40 +92,6 @@ function assertKind(expected, obj, name_opt) {
})();
// Test: Ensure that inlined array calls in crankshaft learn from deopts
// based on the move to a dictionary for the array.
(function() {
function bar(len) {
return new Array(len);
}
a = bar(10);
a[0] = "a string";
a = bar(10);
assertKind(elements_kind.fast, a);
%OptimizeFunctionOnNextCall(bar);
a = bar(10);
assertKind(elements_kind.fast, a);
assertOptimized(bar);
bar(10000);
assertOptimized(bar);
function barn(one, two, three) {
return new Array(one, two, three);
}
a = barn(1, 2, 3);
a[1] = "a string";
a = barn(1, 2, 3);
assertKind(elements_kind.fast, a);
%OptimizeFunctionOnNextCall(barn);
a = barn(1, 2, 3);
assertKind(elements_kind.fast, a);
assertOptimized(barn);
a = barn(1, "oops", 3);
assertOptimized(barn);
})();
// Test: When a method with array constructor is crankshafted, the type
// feedback for elements kind is baked in. Verify that transitions don't
// change it anymore
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment