Index: test/mjsunit/regress/regress-undefined-nan3.js |
diff --git a/test/mjsunit/regress/regress-undefined-nan.js b/test/mjsunit/regress/regress-undefined-nan3.js |
similarity index 60% |
copy from test/mjsunit/regress/regress-undefined-nan.js |
copy to test/mjsunit/regress/regress-undefined-nan3.js |
index cbbb182eeeef31aca7ff5da10a9ce6a15bf3fbd4..636b38a1101a84c661ef5b74bca953eff0338e47 100644 |
--- a/test/mjsunit/regress/regress-undefined-nan.js |
+++ b/test/mjsunit/regress/regress-undefined-nan3.js |
@@ -4,10 +4,6 @@ |
// Flags: --allow-natives-syntax |
-function loader(dst, src, i) { |
- dst[i] = src[i]; |
-} |
- |
var ab = new ArrayBuffer(8); |
var i_view = new Int32Array(ab); |
i_view[0] = 0xFFF7FFFF; |
@@ -17,9 +13,20 @@ var f_view = new Float64Array(ab); |
var fixed_double_elements = new Float64Array(1); |
fixed_double_elements[0] = f_view[0]; |
+function A(src) { this.x = src[0]; } |
+ |
+new A(fixed_double_elements); |
+new A(fixed_double_elements); |
+ |
+%OptimizeFunctionOnNextCall(A); |
+ |
+var obj = new A(fixed_double_elements); |
+ |
+function move_x(dst, obj) { dst[0] = obj.x; } |
+ |
var doubles = [0.5]; |
-loader(doubles, fixed_double_elements, 0); |
-loader(doubles, fixed_double_elements, 0); |
-%OptimizeFunctionOnNextCall(loader); |
-loader(doubles, fixed_double_elements, 0); |
+move_x(doubles, obj); |
+move_x(doubles, obj); |
+%OptimizeFunctionOnNextCall(move_x); |
+move_x(doubles, obj); |
assertTrue(doubles[0] !== undefined); |