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

Unified Diff: pkg/compiler/lib/src/kernel/element_map.dart

Issue 2954463002: Refactoring to prepare for kernel based jump targets (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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 | « pkg/compiler/lib/src/js_model/elements.dart ('k') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/element_map.dart
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart
index 7407499401efc2e3e6c665b3856c96e1c990d918..e27c003b55333365ce6f0465dc3f21095b9cd668 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -1075,9 +1075,39 @@ abstract class KernelToLocalsMap {
/// Returns the [Local] for [node].
Local getLocal(ir.VariableDeclaration node);
- /// Returns the [JumpTarget] for the branch in [node].
- // TODO(johnniwinther): Split this by kind of [node]?
- JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false});
+ /// Returns the [JumpTarget] for the break statement [node].
+ JumpTarget getJumpTargetForBreak(ir.BreakStatement node);
+
+ /// Returns the [JumpTarget] defined by the labelled statement [node] or
+ /// `null` if [node] is not a jump target.
+ JumpTarget getJumpTargetForLabel(ir.LabeledStatement node);
+
+ /// Returns the [JumpTarget] defined by the switch statement [node] or `null`
+ /// if [node] is not a jump target.
+ JumpTarget getJumpTargetForSwitch(ir.SwitchStatement node);
+
+ /// Returns the [JumpTarget] for the continue switch statement [node].
+ JumpTarget getJumpTargetForContinueSwitch(ir.ContinueSwitchStatement node);
+
+ /// Returns the [JumpTarget] defined by the switch case [node] or `null`
+ /// if [node] is not a jump target.
+ JumpTarget getJumpTargetForSwitchCase(ir.SwitchCase node);
+
+ /// Returns the [JumpTarget] defined the do statement [node] or `null`
+ /// if [node] is not a jump target.
+ JumpTarget getJumpTargetForDo(ir.DoStatement node);
+
+ /// Returns the [JumpTarget] defined by the for statement [node] or `null`
+ /// if [node] is not a jump target.
+ JumpTarget getJumpTargetForFor(ir.ForStatement node);
+
+ /// Returns the [JumpTarget] defined by the for-in statement [node] or `null`
+ /// if [node] is not a jump target.
+ JumpTarget getJumpTargetForForIn(ir.ForInStatement node);
+
+ /// Returns the [JumpTarget] defined by the while statement [node] or `null`
+ /// if [node] is not a jump target.
+ JumpTarget getJumpTargetForWhile(ir.WhileStatement node);
/// Returns the [LoopClosureRepresentationInfo] for the loop [node] in
/// [closureClassMaps].
« no previous file with comments | « pkg/compiler/lib/src/js_model/elements.dart ('k') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698