Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: test/mjsunit/regress/regress-undefined-nan3.js

Issue 863153002: Double field values need sNaN -> qNaN canonicalization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-undefined-nan.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/mjsunit/regress/regress-undefined-nan.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698