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

Unified Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart

Issue 1537663002: dart2js: Initial implementation of inlining. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebaseline test expectations and fix a bug (typo). Created 5 years 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 | « pkg/compiler/lib/src/cps_ir/optimizers.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index 422db14ac1ace1f90c0a3d38c4695e691e328a81..f7365b44e731ae5b3ff18cb30d9681d887f5e78d 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -166,6 +166,17 @@ class ShrinkingReducer extends Pass {
InvokeContinuation invoke = cont.body;
Continuation wrappedCont = invoke.continuation.definition;
+ // If the invocation of wrappedCont is escaping, then all invocations of
+ // cont will be as well, after the reduction.
+ if (invoke.isEscapingTry) {
+ Reference current = cont.firstRef;
+ while (current != null) {
+ InvokeContinuation owner = current.parent;
+ owner.isEscapingTry = true;
+ current = current.next;
+ }
+ }
+
// Replace all occurrences with the wrapped continuation.
cont.replaceUsesWith(wrappedCont);
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/optimizers.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698