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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2901823002: Type .targetElement as MemberEntity (Closed)
Patch Set: Created 3 years, 7 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/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index ae96cc34040dee7f918c2edbea6254abaef52330..88d64711b60afd094f1601ad1f798d9a056690aa 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -91,12 +91,12 @@ class KernelAstAdapter extends KernelToElementMapMixin {
/// Called to find the corresponding Kernel element for a particular Element
/// before traversing over it with a Kernel visitor.
- ir.Node getInitialKernelNode(Element originTarget) {
+ ir.Node getInitialKernelNode(MemberElement originTarget) {
ir.Node target;
if (originTarget.isPatch) {
originTarget = originTarget.origin;
}
- if (originTarget is FunctionElement) {
+ if (originTarget is MethodElement) {
if (originTarget is ConstructorBodyElement) {
ConstructorBodyElement body = originTarget;
originTarget = body.constructor;
@@ -104,7 +104,7 @@ class KernelAstAdapter extends KernelToElementMapMixin {
target = kernel.functions[originTarget];
// Closures require a lookup one level deeper in the closure class mapper.
if (target == null) {
- FunctionElement originTargetFunction = originTarget;
+ MethodElement originTargetFunction = originTarget;
ClosureClassMap classMap = _compiler.closureToClassMapper
.getClosureToClassMapping(originTargetFunction.resolvedAst);
if (classMap.closureElement != null) {
@@ -225,7 +225,7 @@ class KernelAstAdapter extends KernelToElementMapMixin {
// If this is a synthetic local, return the synthetic local
if (variable.name == null) {
return _syntheticLocals.putIfAbsent(
- variable, () => new SyntheticLocal("x", null));
+ variable, () => new SyntheticLocal("x", null, null));
}
return getElement(variable) as LocalElement;
}
@@ -267,8 +267,8 @@ class KernelAstAdapter extends KernelToElementMapMixin {
return _resultOf(_target).typeOfSend(getNode(send));
}
- TypeMask typeOfListLiteral(
- Element owner, ir.ListLiteral listLiteral, ClosedWorld closedWorld) {
+ TypeMask typeOfListLiteral(MemberElement owner, ir.ListLiteral listLiteral,
+ ClosedWorld closedWorld) {
ast.Node node = getNodeOrNull(listLiteral);
if (node == null) {
assertNodeIsSynthetic(listLiteral);
« no previous file with comments | « pkg/compiler/lib/src/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698