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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
8 import '../closure.dart'; 8 import '../closure.dart';
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 // now on. 1068 // now on.
1069 /// Call to notify that [member] is currently being inlined. 1069 /// Call to notify that [member] is currently being inlined.
1070 void enterInlinedMember(covariant MemberEntity member); 1070 void enterInlinedMember(covariant MemberEntity member);
1071 1071
1072 /// Call to notify that [member] is no longer being inlined. 1072 /// Call to notify that [member] is no longer being inlined.
1073 void leaveInlinedMember(covariant MemberEntity member); 1073 void leaveInlinedMember(covariant MemberEntity member);
1074 1074
1075 /// Returns the [Local] for [node]. 1075 /// Returns the [Local] for [node].
1076 Local getLocal(ir.VariableDeclaration node); 1076 Local getLocal(ir.VariableDeclaration node);
1077 1077
1078 /// Returns the [JumpTarget] for the branch in [node]. 1078 /// Returns the [JumpTarget] for the break statement [node].
1079 // TODO(johnniwinther): Split this by kind of [node]? 1079 JumpTarget getJumpTargetForBreak(ir.BreakStatement node);
1080 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}); 1080
1081 /// Returns the [JumpTarget] defined by the labelled statement [node] or
1082 /// `null` if [node] is not a jump target.
1083 JumpTarget getJumpTargetForLabel(ir.LabeledStatement node);
1084
1085 /// Returns the [JumpTarget] defined by the switch statement [node] or `null`
1086 /// if [node] is not a jump target.
1087 JumpTarget getJumpTargetForSwitch(ir.SwitchStatement node);
1088
1089 /// Returns the [JumpTarget] for the continue switch statement [node].
1090 JumpTarget getJumpTargetForContinueSwitch(ir.ContinueSwitchStatement node);
1091
1092 /// Returns the [JumpTarget] defined by the switch case [node] or `null`
1093 /// if [node] is not a jump target.
1094 JumpTarget getJumpTargetForSwitchCase(ir.SwitchCase node);
1095
1096 /// Returns the [JumpTarget] defined the do statement [node] or `null`
1097 /// if [node] is not a jump target.
1098 JumpTarget getJumpTargetForDo(ir.DoStatement node);
1099
1100 /// Returns the [JumpTarget] defined by the for statement [node] or `null`
1101 /// if [node] is not a jump target.
1102 JumpTarget getJumpTargetForFor(ir.ForStatement node);
1103
1104 /// Returns the [JumpTarget] defined by the for-in statement [node] or `null`
1105 /// if [node] is not a jump target.
1106 JumpTarget getJumpTargetForForIn(ir.ForInStatement node);
1107
1108 /// Returns the [JumpTarget] defined by the while statement [node] or `null`
1109 /// if [node] is not a jump target.
1110 JumpTarget getJumpTargetForWhile(ir.WhileStatement node);
1081 1111
1082 /// Returns the [LoopClosureRepresentationInfo] for the loop [node] in 1112 /// Returns the [LoopClosureRepresentationInfo] for the loop [node] in
1083 /// [closureClassMaps]. 1113 /// [closureClassMaps].
1084 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( 1114 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop(
1085 ClosureDataLookup closureLookup, ir.TreeNode node); 1115 ClosureDataLookup closureLookup, ir.TreeNode node);
1086 } 1116 }
1087 1117
1088 /// Comparator for the canonical order or named arguments. 1118 /// Comparator for the canonical order or named arguments.
1089 // TODO(johnniwinther): Remove this when named parameters are sorted in dill. 1119 // TODO(johnniwinther): Remove this when named parameters are sorted in dill.
1090 int namedOrdering(ir.VariableDeclaration a, ir.VariableDeclaration b) { 1120 int namedOrdering(ir.VariableDeclaration a, ir.VariableDeclaration b) {
1091 return a.name.compareTo(b.name); 1121 return a.name.compareTo(b.name);
1092 } 1122 }
OLDNEW
« 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