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

Unified Diff: test/mjsunit/regress/regress-crbug-614644.js

Issue 2161943002: [crankshaft] Guard against side effects in Array.prototype.shift lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/crankshaft/hydrogen.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-crbug-614644.js
diff --git a/test/mjsunit/regress/regress-crbug-624919.js b/test/mjsunit/regress/regress-crbug-614644.js
similarity index 70%
copy from test/mjsunit/regress/regress-crbug-624919.js
copy to test/mjsunit/regress/regress-crbug-614644.js
index 5a2b100daff3dcd5f2d16f253e589baa106f4370..d219cd3b927b035706a2a73a16b936b0324805a3 100644
--- a/test/mjsunit/regress/regress-crbug-624919.js
+++ b/test/mjsunit/regress/regress-crbug-614644.js
@@ -4,11 +4,12 @@
// Flags: --allow-natives-syntax
-function f(a, b, c, d, e) {
- if (a && (b, c ? d() : e())) return 0;
+function f(a, x) {
+ a.shift(2, a.length = 2);
+ a[0] = x;
}
-f();
-f();
+f([ ], 1.1);
+f([1], 1.1);
%OptimizeFunctionOnNextCall(f);
-f();
+f([1], 1.1);
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698