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

Unified Diff: test/mjsunit/compiler/regress-5074.js

Issue 2048643002: [crankshaft] Fix invalid number truncation assumption on HAdd inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refine the flag handling to not introduce deopt loops. Created 4 years, 6 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/crankshaft/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-5074.js
diff --git a/test/mjsunit/regress/regress-3650-3.js b/test/mjsunit/compiler/regress-5074.js
similarity index 56%
copy from test/mjsunit/regress/regress-3650-3.js
copy to test/mjsunit/compiler/regress-5074.js
index 013e4df2834e20435982300303eb6260eb41b2be..903b54ad980042d134428d1c9be329499530cdef 100644
--- a/test/mjsunit/regress/regress-3650-3.js
+++ b/test/mjsunit/compiler/regress-5074.js
@@ -4,14 +4,15 @@
// Flags: --allow-natives-syntax
-function foo(a) {
- for (var d in a) {
- delete a[1];
- }
+var s = [,0.1];
+
+function foo(a, b) {
+ var x = s[a];
+ s[1] = 0.1;
+ return x + b;
}
-foo([1,2,3]);
-foo([2,3,4]);
+assertEquals(2.1, foo(1, 2));
+assertEquals(2.1, foo(1, 2));
%OptimizeFunctionOnNextCall(foo);
-foo([1,2,3]);
-assertOptimized(foo);
+assertEquals("undefined2", foo(0, "2"));
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698