| Index: test/mjsunit/array-constructor-feedback.js
|
| diff --git a/test/mjsunit/array-constructor-feedback.js b/test/mjsunit/array-constructor-feedback.js
|
| index e14c344278de85efc71f6b8d6f45be245038b00a..b8e1f5c71f9134540183d956818cf91e648c2b8a 100644
|
| --- a/test/mjsunit/array-constructor-feedback.js
|
| +++ b/test/mjsunit/array-constructor-feedback.js
|
| @@ -216,3 +216,17 @@ function assertKind(expected, obj, name_opt) {
|
| assertFalse(isHoley(a));
|
| }
|
| })();
|
| +
|
| +// Test: Make sure that crankshaft continues with feedback for large arrays.
|
| +(function() {
|
| + function bar(len) { return new Array(len); }
|
| + var size = 100001;
|
| + bar(size)[10] = 'string';
|
| + assertKind(elements_kind.fast, bar(size));
|
| + %OptimizeFunctionOnNextCall(bar);
|
| + assertKind(elements_kind.fast, bar(size));
|
| + // But there is a limit, based on the size of the old generation, currently
|
| + // 22937600, but double it to prevent the test being too brittle.
|
| + var large_size = 22937600 * 2;
|
| + assertKind(elements_kind.dictionary, bar(large_size));
|
| +})();
|
|
|