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

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

Issue 2126613002: making heap verification more aggressive (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding additional validation Created 4 years, 5 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 | « src/runtime/runtime-regexp.cc ('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-nan.js
diff --git a/test/mjsunit/regress/regress-undefined-nan.js b/test/mjsunit/regress/regress-undefined-nan.js
index 0e9b3d3f4a12bba68ec2380eac985a94f75b4875..bb935c28485ea2e3a06c77efddfd6795459d9f7e 100644
--- a/test/mjsunit/regress/regress-undefined-nan.js
+++ b/test/mjsunit/regress/regress-undefined-nan.js
@@ -3,11 +3,6 @@
// found in the LICENSE file.
// 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] = %GetHoleNaNUpper()
@@ -26,10 +21,20 @@ opt_store();
var i32 = new Int32Array(fixed_double_elements.buffer);
assertEquals(i_view[0], i32[0]);
assertEquals(i_view[1], i32[1]);
+assertTrue(isNaN(f_view [0]));
+
+
+function loader(dst, src, i) {
+ dst[i] = src[i];
+}
var doubles = [0.5];
loader(doubles, fixed_double_elements, 0);
loader(doubles, fixed_double_elements, 0);
+assertTrue(doubles[0] !== undefined);
+assertTrue(isNaN(doubles[0]));
+
%OptimizeFunctionOnNextCall(loader);
loader(doubles, fixed_double_elements, 0);
assertTrue(doubles[0] !== undefined);
+assertTrue(isNaN(doubles[0]));
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698