OLD | NEW |
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:compiler/src/common.dart'; | 5 import 'package:compiler/src/common.dart'; |
6 import 'package:compiler/src/elements/elements.dart'; | 6 import 'package:compiler/src/elements/elements.dart'; |
7 import 'package:compiler/src/resolution/access_semantics.dart'; | 7 import 'package:compiler/src/resolution/access_semantics.dart'; |
8 import 'package:compiler/src/resolution/send_structure.dart'; | 8 import 'package:compiler/src/resolution/send_structure.dart'; |
9 import 'package:compiler/src/resolution/tree_elements.dart'; | 9 import 'package:compiler/src/resolution/tree_elements.dart'; |
10 import 'package:compiler/src/tree/nodes.dart' as ast; | 10 import 'package:compiler/src/tree/nodes.dart' as ast; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 String memberName = element.name; | 114 String memberName = element.name; |
115 if (element.isSetter) { | 115 if (element.isSetter) { |
116 memberName += '='; | 116 memberName += '='; |
117 } | 117 } |
118 String className = element.enclosingClass?.name; | 118 String className = element.enclosingClass?.name; |
119 return new ElementId.internal(memberName, className); | 119 return new ElementId.internal(memberName, className); |
120 } | 120 } |
121 | 121 |
122 NodeId computeAccessId(ast.Send node, AccessSemantics access) { | 122 NodeId computeAccessId(ast.Send node, AccessSemantics access) { |
123 switch (access.kind) { | 123 switch (access.kind) { |
| 124 case AccessKind.THIS_PROPERTY: |
124 case AccessKind.DYNAMIC_PROPERTY: | 125 case AccessKind.DYNAMIC_PROPERTY: |
125 case AccessKind.LOCAL_VARIABLE: | 126 case AccessKind.LOCAL_VARIABLE: |
126 case AccessKind.FINAL_LOCAL_VARIABLE: | 127 case AccessKind.FINAL_LOCAL_VARIABLE: |
127 case AccessKind.LOCAL_FUNCTION: | 128 case AccessKind.LOCAL_FUNCTION: |
128 case AccessKind.PARAMETER: | 129 case AccessKind.PARAMETER: |
129 case AccessKind.FINAL_PARAMETER: | 130 case AccessKind.FINAL_PARAMETER: |
130 case AccessKind.EXPRESSION: | 131 case AccessKind.EXPRESSION: |
131 return computeDefaultNodeId(node.selector); | 132 return computeDefaultNodeId(node.selector); |
132 default: | 133 default: |
133 return null; | 134 return null; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 visitSwitchCase(ir.SwitchCase node) { | 388 visitSwitchCase(ir.SwitchCase node) { |
388 computeForNode(node, computeSwitchCaseNodeId(node)); | 389 computeForNode(node, computeSwitchCaseNodeId(node)); |
389 super.visitSwitchCase(node); | 390 super.visitSwitchCase(node); |
390 } | 391 } |
391 | 392 |
392 visitContinueSwitchStatement(ir.ContinueSwitchStatement node) { | 393 visitContinueSwitchStatement(ir.ContinueSwitchStatement node) { |
393 computeForNode(node, computeGotoNodeId(node)); | 394 computeForNode(node, computeGotoNodeId(node)); |
394 super.visitContinueSwitchStatement(node); | 395 super.visitContinueSwitchStatement(node); |
395 } | 396 } |
396 } | 397 } |
OLD | NEW |