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

Unified Diff: test/mjsunit/regress/regress-binop.js

Issue 133443009: A64: Synchronize with r17441. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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
Index: test/mjsunit/regress/regress-binop.js
diff --git a/test/mjsunit/regress/regress-binop.js b/test/mjsunit/regress/regress-binop.js
index 6050b6d9a3d0ae506dd0711379daf61d562a673b..7a8b41924dd5673a698d0ca8ef4135c470b5d862 100644
--- a/test/mjsunit/regress/regress-binop.js
+++ b/test/mjsunit/regress/regress-binop.js
@@ -166,3 +166,16 @@ assertEquals(t2(undefined,2), NaN/2);
assertEquals(t2(1,1<<30), 1/(1<<30));
assertEquals(t2(1,2), 1/2);
+
+// Assert that the hole is not truncated to nan for string add.
+function string_add(a,i) {
+ var d = [0.1, ,0.3];
+ return a + d[i];
+}
+
+string_add(1.1, 0);
+string_add("", 0);
+%OptimizeFunctionOnNextCall(string_add);
+string_add(1.1, 0);
+// There comes the hole
+assertEquals("undefined", string_add("", 1));
« no previous file with comments | « test/mjsunit/regress/regress-array-pop-nonconfigurable.js ('k') | test/mjsunit/regress/regress-compare-constant-doubles.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698