Index: test/mjsunit/regress/regress-seqstrsetchar-ex3.js |
diff --git a/test/mjsunit/elide-double-hole-check-7.js b/test/mjsunit/regress/regress-seqstrsetchar-ex3.js |
similarity index 84% |
copy from test/mjsunit/elide-double-hole-check-7.js |
copy to test/mjsunit/regress/regress-seqstrsetchar-ex3.js |
index 2b13aff881589d79051a23819415be3fa22eee30..e2592a1615aa6bcfbbaa688319b8a0f6d34aa4a7 100644 |
--- a/test/mjsunit/elide-double-hole-check-7.js |
+++ b/test/mjsunit/regress/regress-seqstrsetchar-ex3.js |
@@ -27,14 +27,19 @@ |
// Flags: --allow-natives-syntax |
-function f1(a, i) { |
- return a[i] + 0.5; |
+function test() { |
+ var string = %NewString(10, true); |
+ for (var i = 0; i < 10; i++) { |
+ %_OneByteSeqStringSetChar(string, i, 65); |
+ %_OneByteSeqStringSetChar(string, i, 66); |
+ } |
+ for (var i = 0; i < 10; i++) { |
+ assertEquals("B", string[i]); |
+ } |
} |
-var arr = [0.0,,2.5]; |
-assertEquals(0.5, f1(arr, 0)); |
-assertEquals(0.5, f1(arr, 0)); |
-Array.prototype.__proto__[1] = 1.5; |
-assertEquals(2, f1(arr, 1)); |
-%OptimizeFunctionOnNextCall(f1); |
-assertEquals(2, f1(arr, 1)); |
-assertEquals(0.5, f1(arr, 0)); |
+ |
+test(); |
+test(); |
+%OptimizeFunctionOnNextCall(test); |
+test(); |
+ |