| 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 /// Entity model for elements derived from Kernel IR. | 5 /// Entity model for elements derived from Kernel IR. |
| 6 | 6 |
| 7 import '../elements/entities.dart'; | 7 import '../elements/entities.dart'; |
| 8 import '../elements/names.dart'; | 8 import '../elements/names.dart'; |
| 9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
| 10 import 'elements.dart'; | 10 import 'elements.dart'; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 : super(memberIndex, enclosingClass, name, parameterStructure, | 157 : super(memberIndex, enclosingClass, name, parameterStructure, |
| 158 isExternal: isExternal, isConst: isConst); | 158 isExternal: isExternal, isConst: isConst); |
| 159 | 159 |
| 160 @override | 160 @override |
| 161 bool get isFactoryConstructor => true; | 161 bool get isFactoryConstructor => true; |
| 162 | 162 |
| 163 @override | 163 @override |
| 164 bool get isGenerativeConstructor => false; | 164 bool get isGenerativeConstructor => false; |
| 165 } | 165 } |
| 166 | 166 |
| 167 class KConstructorBody extends KFunction implements ConstructorBodyEntity { |
| 168 final ConstructorEntity constructor; |
| 169 |
| 170 KConstructorBody(int memberIndex, this.constructor) |
| 171 : super( |
| 172 memberIndex, |
| 173 constructor.library, |
| 174 constructor.enclosingClass, |
| 175 constructor.memberName, |
| 176 constructor.parameterStructure, |
| 177 AsyncMarker.SYNC, |
| 178 isStatic: false, |
| 179 isExternal: false); |
| 180 |
| 181 @override |
| 182 bool get isFunction => true; |
| 183 |
| 184 String get _kind => 'constructor_body'; |
| 185 } |
| 186 |
| 167 class KMethod extends KFunction { | 187 class KMethod extends KFunction { |
| 168 final bool isAbstract; | 188 final bool isAbstract; |
| 169 | 189 |
| 170 KMethod(int memberIndex, KLibrary library, KClass enclosingClass, Name name, | 190 KMethod(int memberIndex, KLibrary library, KClass enclosingClass, Name name, |
| 171 ParameterStructure parameterStructure, AsyncMarker asyncMarker, | 191 ParameterStructure parameterStructure, AsyncMarker asyncMarker, |
| 172 {bool isStatic, bool isExternal, this.isAbstract}) | 192 {bool isStatic, bool isExternal, this.isAbstract}) |
| 173 : super(memberIndex, library, enclosingClass, name, parameterStructure, | 193 : super(memberIndex, library, enclosingClass, name, parameterStructure, |
| 174 asyncMarker, | 194 asyncMarker, |
| 175 isStatic: isStatic, isExternal: isExternal); | 195 isStatic: isStatic, isExternal: isExternal); |
| 176 | 196 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 final MemberEntity memberContext; | 264 final MemberEntity memberContext; |
| 245 final Entity executableContext; | 265 final Entity executableContext; |
| 246 final FunctionType functionType; | 266 final FunctionType functionType; |
| 247 | 267 |
| 248 KLocalFunction( | 268 KLocalFunction( |
| 249 this.name, this.memberContext, this.executableContext, this.functionType); | 269 this.name, this.memberContext, this.executableContext, this.functionType); |
| 250 | 270 |
| 251 String toString() => | 271 String toString() => |
| 252 '${kElementPrefix}local_function(${memberContext.name}.${name ?? '<anonymo
us>'})'; | 272 '${kElementPrefix}local_function(${memberContext.name}.${name ?? '<anonymo
us>'})'; |
| 253 } | 273 } |
| OLD | NEW |