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

Unified Diff: test/mjsunit/compiler/regress-escape-analysis-indirect.js

Issue 2369953002: [turbofan] Fix indirect escapes in escape analysis. (Closed)
Patch Set: Created 4 years, 3 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/compiler/escape-analysis-reducer.cc ('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-escape-analysis-indirect.js
diff --git a/test/mjsunit/regress/regress-crbug-644245.js b/test/mjsunit/compiler/regress-escape-analysis-indirect.js
similarity index 51%
copy from test/mjsunit/regress/regress-crbug-644245.js
copy to test/mjsunit/compiler/regress-escape-analysis-indirect.js
index 7f4e00599e7eabfd8923c81debd3633bcfb095fb..6d79a9313374a31125164304325b0620790381d3 100644
--- a/test/mjsunit/regress/regress-crbug-644245.js
+++ b/test/mjsunit/compiler/regress-escape-analysis-indirect.js
@@ -4,15 +4,14 @@
// Flags: --allow-natives-syntax --turbo --turbo-escape
-function f() {
- try {
- throw "boom";
- } catch(e) {
- %_DeoptimizeNow();
- }
+function f(apply) {
+ var value = 23;
+ apply(function bogeyman() { value = 42 });
+ return value;
}
-
-f();
-f();
+function apply(fun) { fun() }
+assertEquals(42, f(apply));
+assertEquals(42, f(apply));
+%NeverOptimizeFunction(apply);
%OptimizeFunctionOnNextCall(f);
-f();
+assertEquals(42, f(apply));
« no previous file with comments | « src/compiler/escape-analysis-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698