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

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

Issue 2981423003: Move .getLocalFunction from KernelToElementMap to KernelToLocalsMap (Closed)
Patch Set: Updated cf. comments Created 3 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 | « pkg/compiler/lib/src/js_model/locals.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 dfe03f77692fc02804ff95863e856733becffe44..f75239372cfde791079e14d24702072481ecd17a 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -63,11 +63,6 @@ abstract class KernelToElementMap {
/// Returns the [ClassEntity] corresponding to the class [node].
ClassEntity getClass(ir.Class node);
- /// Returns the [Local] corresponding to the [node]. The node must be either
- /// a [ir.FunctionDeclaration] or [ir.FunctionExpression].
- // TODO(johnniwinther): Move this to [KernelToElementMapForImpact].
- Local getLocalFunction(ir.TreeNode node);
-
/// Returns the super [MemberEntity] for a super invocation, get or set of
/// [name] from the member [context].
///
@@ -154,6 +149,10 @@ abstract class KernelToElementMapForImpact extends KernelToElementMap {
/// Computes the [InterfaceType] referenced by a call to the
/// [JS_INTERCEPTOR_CONSTANT] function, if any.
InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node);
+
+ /// Returns the [Local] corresponding to the [node]. The node must be either
+ /// a [ir.FunctionDeclaration] or [ir.FunctionExpression].
+ Local getLocalFunction(ir.TreeNode node);
}
/// Interface that translates between Kernel IR nodes and entities used for
@@ -362,7 +361,6 @@ abstract class KernelToTypeInferenceMap {
}
/// Map from kernel IR nodes to local entities.
-// TODO(johnniwinther): Add `getLocalFunction`.
abstract class KernelToLocalsMap {
/// The member currently being built.
MemberEntity get currentMember;
@@ -376,7 +374,11 @@ abstract class KernelToLocalsMap {
void leaveInlinedMember(covariant MemberEntity member);
/// Returns the [Local] for [node].
- Local getLocal(ir.VariableDeclaration node);
+ Local getLocalVariable(ir.VariableDeclaration node);
+
+ /// Returns the [Local] corresponding to the [node]. The node must be either
+ /// a [ir.FunctionDeclaration] or [ir.FunctionExpression].
+ Local getLocalFunction(ir.TreeNode node);
/// Returns the [JumpTarget] for the break statement [node].
JumpTarget getJumpTargetForBreak(ir.BreakStatement node);
« no previous file with comments | « pkg/compiler/lib/src/js_model/locals.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