| Index: test/mjsunit/lithium/SeqStringSetChar.js
|
| diff --git a/test/mjsunit/array-non-smi-length.js b/test/mjsunit/lithium/SeqStringSetChar.js
|
| similarity index 72%
|
| copy from test/mjsunit/array-non-smi-length.js
|
| copy to test/mjsunit/lithium/SeqStringSetChar.js
|
| index 23a25ee797bd68690ad2a7ce26a9135e23b486e2..3c890a84897f0014f79f07ef624daf8c3bf825a4 100644
|
| --- a/test/mjsunit/array-non-smi-length.js
|
| +++ b/test/mjsunit/lithium/SeqStringSetChar.js
|
| @@ -27,20 +27,20 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -function TestNonSmiArrayLength() {
|
| - function f(a) {
|
| - return a.length+1;
|
| - }
|
| -
|
| - var a = [];
|
| - a.length = 0xFFFF;
|
| - assertSame(0x10000, f(a));
|
| - assertSame(0x10000, f(a));
|
| -
|
| - %OptimizeFunctionOnNextCall(f);
|
| - a.length = 0xFFFFFFFF;
|
| - assertSame(0x100000000, f(a));
|
| +function MyStringFromCharCode(code, i) {
|
| + var one_byte = %NewString(3, true);
|
| + %_OneByteSeqStringSetChar(one_byte, 0, code);
|
| + %_OneByteSeqStringSetChar(one_byte, 1, code);
|
| + %_OneByteSeqStringSetChar(one_byte, i, code);
|
| + var two_byte = %NewString(3, false);
|
| + %_TwoByteSeqStringSetChar(two_byte, 0, code);
|
| + %_TwoByteSeqStringSetChar(two_byte, 1, code);
|
| + %_TwoByteSeqStringSetChar(two_byte, i, code);
|
| + return one_byte + two_byte;
|
| }
|
|
|
| -TestNonSmiArrayLength();
|
| -
|
| +MyStringFromCharCode(65, 2);
|
| +var r1 = MyStringFromCharCode(65, 2);
|
| +%OptimizeFunctionOnNextCall(MyStringFromCharCode);
|
| +var r2 = MyStringFromCharCode(65, 2);
|
| +assertEquals(r1, r2);
|
|
|