| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.kernel_class_builder; | 5 library fasta.kernel_class_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' show | 7 import 'package:kernel/ast.dart' show |
| 8 Class, | 8 Class, |
| 9 DartType, | 9 DartType, |
| 10 ExpressionStatement, | 10 ExpressionStatement, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 import 'redirecting_factory_body.dart' show | 32 import 'redirecting_factory_body.dart' show |
| 33 RedirectingFactoryBody; | 33 RedirectingFactoryBody; |
| 34 | 34 |
| 35 abstract class KernelClassBuilder | 35 abstract class KernelClassBuilder |
| 36 extends ClassBuilder<KernelTypeBuilder, InterfaceType> { | 36 extends ClassBuilder<KernelTypeBuilder, InterfaceType> { |
| 37 KernelClassBuilder( | 37 KernelClassBuilder( |
| 38 List<MetadataBuilder> metadata, int modifiers, | 38 List<MetadataBuilder> metadata, int modifiers, |
| 39 String name, List<TypeVariableBuilder> typeVariables, | 39 String name, List<TypeVariableBuilder> typeVariables, |
| 40 KernelTypeBuilder supertype, List<KernelTypeBuilder> interfaces, | 40 KernelTypeBuilder supertype, List<KernelTypeBuilder> interfaces, |
| 41 Map<String, Builder> members, List<KernelTypeBuilder> types, | 41 Map<String, Builder> members, LibraryBuilder parent, int charOffset) |
| 42 LibraryBuilder parent, int charOffset) | |
| 43 : super(metadata, modifiers, name, typeVariables, supertype, interfaces, | 42 : super(metadata, modifiers, name, typeVariables, supertype, interfaces, |
| 44 members, types, parent, charOffset); | 43 members, parent, charOffset); |
| 45 | 44 |
| 46 Class get cls; | 45 Class get cls; |
| 47 | 46 |
| 48 Class get target => cls; | 47 Class get target => cls; |
| 49 | 48 |
| 50 /// [arguments] have already been built. | 49 /// [arguments] have already been built. |
| 51 InterfaceType buildTypesWithBuiltArguments(List<DartType> arguments) { | 50 InterfaceType buildTypesWithBuiltArguments(List<DartType> arguments) { |
| 52 return arguments == null | 51 return arguments == null |
| 53 ? cls.rawType | 52 ? cls.rawType |
| 54 : new InterfaceType(cls, | 53 : new InterfaceType(cls, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 builder.body = new ExpressionStatement( | 111 builder.body = new ExpressionStatement( |
| 113 new Throw(new StringLiteral(message))); | 112 new Throw(new StringLiteral(message))); |
| 114 } | 113 } |
| 115 } | 114 } |
| 116 } | 115 } |
| 117 }); | 116 }); |
| 118 } | 117 } |
| 119 return count; | 118 return count; |
| 120 } | 119 } |
| 121 } | 120 } |
| OLD | NEW |