| Index: test/mjsunit/json2.js
|
| diff --git a/test/mjsunit/regress/regress-2110.js b/test/mjsunit/json2.js
|
| similarity index 74%
|
| copy from test/mjsunit/regress/regress-2110.js
|
| copy to test/mjsunit/json2.js
|
| index d7f78d26a7b4d16c4217d2b0ac136e52e4542eb1..c4392401ce74cfe501666182de515313b2771896 100644
|
| --- a/test/mjsunit/regress/regress-2110.js
|
| +++ b/test/mjsunit/json2.js
|
| @@ -27,27 +27,22 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -var uint8 = new Uint8Array(1);
|
| +var fast_smi = [1, 2, 3, 4];
|
| +fast_smi.__proto__ = [7, 7, 7, 7];
|
| +delete fast_smi[2];
|
| +assertTrue(%HasFastSmiElements(fast_smi));
|
| +assertEquals("[1,2,7,4]", JSON.stringify(fast_smi));
|
|
|
| -function test() {
|
| - uint8[0] = 0x800000aa;
|
| - assertEquals(0xaa, uint8[0]);
|
| -}
|
| +var fast_double = [1.1, 2, 3, 4];
|
| +fast_double.__proto__ = [7, 7, 7, 7];
|
|
|
| -test();
|
| -test();
|
| -test();
|
| -%OptimizeFunctionOnNextCall(test);
|
| -test();
|
| +delete fast_double[2];
|
| +assertTrue(%HasFastDoubleElements(fast_double));
|
| +assertEquals("[1.1,2,7,4]", JSON.stringify(fast_double));
|
|
|
| -var uint32 = new Uint32Array(1);
|
| +var fast_obj = [1, 2, {}, {}];
|
| +fast_obj.__proto__ = [7, 7, 7, 7];
|
|
|
| -function test2() {
|
| - uint32[0] = 0x80123456789abcde;
|
| - assertEquals(0x789ac000, uint32[0]);
|
| -}
|
| -
|
| -test2();
|
| -test2();
|
| -%OptimizeFunctionOnNextCall(test2);
|
| -test2();
|
| +delete fast_obj[2];
|
| +assertTrue(%HasFastObjectElements(fast_obj));
|
| +assertEquals("[1,2,7,{}]", JSON.stringify(fast_obj));
|
|
|