| 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 '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../common/names.dart'; | 6 import '../common/names.dart'; |
| 7 import '../compiler.dart'; | 7 import '../compiler.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 ast.Node computeMemberBody(covariant MemberElement member) { | 32 ast.Node computeMemberBody(covariant MemberElement member) { |
| 33 ResolvedAst resolvedAst = member.resolvedAst; | 33 ResolvedAst resolvedAst = member.resolvedAst; |
| 34 ast.Node body; | 34 ast.Node body; |
| 35 if (resolvedAst.kind == ResolvedAstKind.PARSED) { | 35 if (resolvedAst.kind == ResolvedAstKind.PARSED) { |
| 36 body = resolvedAst.body; | 36 body = resolvedAst.body; |
| 37 } | 37 } |
| 38 return body; | 38 return body; |
| 39 } | 39 } |
| 40 | 40 |
| 41 void forEachParameter( | |
| 42 covariant MethodElement method, void f(Local parameter)) { | |
| 43 MethodElement implementation = method.implementation; | |
| 44 implementation.functionSignature | |
| 45 .forEachParameter((FormalElement _parameter) { | |
| 46 ParameterElement parameter = _parameter; | |
| 47 f(parameter); | |
| 48 }); | |
| 49 } | |
| 50 | |
| 51 FunctionEntity lookupCallMethod(covariant ClassElement cls) { | 41 FunctionEntity lookupCallMethod(covariant ClassElement cls) { |
| 52 MethodElement callMethod = cls.lookupMember(Identifiers.call); | 42 MethodElement callMethod = cls.lookupMember(Identifiers.call); |
| 53 if (callMethod == null) { | 43 if (callMethod == null) { |
| 54 callMethod = cls.lookupMember(Identifiers.noSuchMethod_); | 44 callMethod = cls.lookupMember(Identifiers.noSuchMethod_); |
| 55 } | 45 } |
| 56 return callMethod; | 46 return callMethod; |
| 57 } | 47 } |
| 58 | 48 |
| 59 TypeInformation computeMemberTypeInformation( | 49 TypeInformation computeMemberTypeInformation( |
| 60 MemberEntity member, ast.Node body) { | 50 MemberEntity member, ast.Node body) { |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 @override | 192 @override |
| 203 bool checkPhiNode(ast.Node node) { | 193 bool checkPhiNode(ast.Node node) { |
| 204 return true; | 194 return true; |
| 205 } | 195 } |
| 206 | 196 |
| 207 @override | 197 @override |
| 208 bool checkClassEntity(covariant ClassElement cls) { | 198 bool checkClassEntity(covariant ClassElement cls) { |
| 209 return cls.isDeclaration; | 199 return cls.isDeclaration; |
| 210 } | 200 } |
| 211 } | 201 } |
| OLD | NEW |