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

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

Issue 2159603002: [turbofan] In effect control linearizer, only delay effect phi update for loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment 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
Index: test/mjsunit/compiler/regress-628403.js
diff --git a/test/mjsunit/compiler/regress-621423.js b/test/mjsunit/compiler/regress-628403.js
similarity index 50%
copy from test/mjsunit/compiler/regress-621423.js
copy to test/mjsunit/compiler/regress-628403.js
index 962176ffbff75281ae55fed8a05fb40158f0d6f1..4096ac32aee4692487618fc53f6b7bcf703a9098 100644
--- a/test/mjsunit/compiler/regress-621423.js
+++ b/test/mjsunit/compiler/regress-628403.js
@@ -4,18 +4,24 @@
// Flags: --allow-natives-syntax
-var a = [0, ""];
-a[0] = 0;
+var dothrow = false;
-function g(array) {
- array[1] = undefined;
+function g() {
+ if (dothrow) throw 1;
}
-function f() {
- g(function() {});
- g(a);
+function f(a) {
+ try {
+ g();
+ } catch(e) {
+ if (typeof e !== 'number' && e !== 1) throw e;
+ return a[0];
+ }
}
+%NeverOptimizeFunction(g);
f();
-%OptimizeFunctionOnNextCall(f);
f();
+%OptimizeFunctionOnNextCall(f);
+dothrow = true;
+assertEquals(42, f([42]));
« src/compiler/effect-control-linearizer.cc ('K') | « src/compiler/effect-control-linearizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698