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

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: 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
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..dbaffee39e083b6833a86830a7bb8b6149391018 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 try when [enterTry] has been called without
floitsch 2015/07/06 18:18:35 -try-
asgerf 2015/07/07 08:42:04 -> true :)
+ /// 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);
floitsch 2015/07/06 18:18:35 indent +2
asgerf 2015/07/07 08:42:04 Done.
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') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698