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

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

Issue 1220123004: dart2js cps: Ensure definitions are specialized before their uses. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 5 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 | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.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/cps_ir_builder.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index e720a110e5f26a0c419a883c4b7eff0ae265df24..b15088584e373cdd6b5b0795974986a696321ea5 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -191,6 +191,12 @@ abstract class JumpCollector {
}
}
}
+
+ /// True if a jump inserted now will escape from a try block.
+ ///
+ /// Concretely, this is true when [enterTry] has been called without
+ /// its corresponding [leaveTry] call.
+ bool get isEscapingTry => _boxedTryVariables.isNotEmpty;
}
/// A class to collect 'forward' jumps.
@@ -241,7 +247,8 @@ class ForwardJumpCollector extends JumpCollector {
void addJump(IrBuilder builder, [ir.Primitive value]) {
assert(_continuation == null);
_buildTryExit(builder);
- ir.InvokeContinuation invoke = new ir.InvokeContinuation.uninitialized();
+ ir.InvokeContinuation invoke = new ir.InvokeContinuation.uninitialized(
+ isEscapingTry: isEscapingTry);
builder.add(invoke);
_invocations.add(invoke);
// Truncate the environment at the invocation site so it only includes
@@ -360,7 +367,8 @@ class BackwardJumpCollector extends JumpCollector {
if (value != null) builder.environment.extend(null, value);
builder.add(new ir.InvokeContinuation(_continuation,
builder.environment.index2value,
- isRecursive: true));
+ isRecursive: true,
+ isEscapingTry: isEscapingTry));
builder._current = null;
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698