| 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 library dart2js.js_model.elements; | 5 library dart2js.js_model.elements; |
| 6 | 6 |
| 7 import '../common/names.dart' show Identifiers; | 7 import '../common/names.dart' show Names; |
| 8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
| 9 import '../elements/names.dart'; | 9 import '../elements/names.dart'; |
| 10 import '../elements/types.dart'; | 10 import '../elements/types.dart'; |
| 11 import '../kernel/elements.dart'; | 11 import '../kernel/elements.dart'; |
| 12 import '../kernel/element_map_impl.dart'; | 12 import '../kernel/element_map_impl.dart'; |
| 13 import 'closure.dart' show KernelClosureClass; | 13 import 'closure.dart' show KernelClosureClass; |
| 14 | 14 |
| 15 /// Map from 'frontend' to 'backend' elements. | 15 /// Map from 'frontend' to 'backend' elements. |
| 16 /// | 16 /// |
| 17 /// Frontend elements are what we read in, these typically represents concepts | 17 /// Frontend elements are what we read in, these typically represents concepts |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 JField(int memberIndex, JLibrary library, JClass enclosingClass, Name name, | 513 JField(int memberIndex, JLibrary library, JClass enclosingClass, Name name, |
| 514 {bool isStatic, this.isAssignable, this.isConst}) | 514 {bool isStatic, this.isAssignable, this.isConst}) |
| 515 : super(memberIndex, library, enclosingClass, name, isStatic: isStatic); | 515 : super(memberIndex, library, enclosingClass, name, isStatic: isStatic); |
| 516 | 516 |
| 517 @override | 517 @override |
| 518 bool get isField => true; | 518 bool get isField => true; |
| 519 | 519 |
| 520 String get _kind => 'field'; | 520 String get _kind => 'field'; |
| 521 } | 521 } |
| 522 | 522 |
| 523 class JClosureCallMethod extends JFunction { | 523 class JClosureCallMethod extends JMethod { |
| 524 JClosureCallMethod(int memberIndex, KernelClosureClass containingClass, | 524 JClosureCallMethod(int memberIndex, KernelClosureClass containingClass, |
| 525 JFunction origClosureFunctionNode) | 525 ParameterStructure parameterStructure, AsyncMarker asyncMarker) |
| 526 : super( | 526 : super(memberIndex, containingClass.library, containingClass, Names.call, |
| 527 memberIndex, | 527 parameterStructure, asyncMarker, |
| 528 containingClass.library, | 528 isStatic: false, isExternal: false, isAbstract: false); |
| 529 containingClass, | |
| 530 new Name(Identifiers.call, containingClass.library), | |
| 531 origClosureFunctionNode.parameterStructure, | |
| 532 origClosureFunctionNode.asyncMarker); | |
| 533 | 529 |
| 534 String get _kind => 'closure_call'; | 530 String get _kind => 'closure_call'; |
| 535 } | 531 } |
| 536 | 532 |
| 537 class JTypeVariable implements TypeVariableEntity, IndexedTypeVariable { | 533 class JTypeVariable implements TypeVariableEntity, IndexedTypeVariable { |
| 538 final int typeVariableIndex; | 534 final int typeVariableIndex; |
| 539 final Entity typeDeclaration; | 535 final Entity typeDeclaration; |
| 540 final String name; | 536 final String name; |
| 541 final int index; | 537 final int index; |
| 542 | 538 |
| 543 JTypeVariable( | 539 JTypeVariable( |
| 544 this.typeVariableIndex, this.typeDeclaration, this.name, this.index); | 540 this.typeVariableIndex, this.typeDeclaration, this.name, this.index); |
| 545 | 541 |
| 546 String toString() => | 542 String toString() => |
| 547 '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)'; | 543 '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)'; |
| 548 } | 544 } |
| OLD | NEW |