Chromium Code Reviews| 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.dill_class_builder; | 5 library fasta.dill_class_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' show | 7 import 'package:kernel/ast.dart' show |
| 8 Class, | 8 Class, |
| 9 Constructor, | 9 Constructor, |
| 10 Member, | 10 Member, |
| 11 Procedure, | 11 Procedure, |
| 12 ProcedureKind; | 12 ProcedureKind; |
| 13 | 13 |
| 14 import '../errors.dart' show | |
| 15 internalError; | |
| 16 | |
| 14 import '../kernel/kernel_builder.dart' show | 17 import '../kernel/kernel_builder.dart' show |
| 15 Builder, | 18 Builder, |
| 16 KernelClassBuilder; | 19 KernelClassBuilder, |
| 20 TypeBuilder; | |
| 17 | 21 |
| 18 import '../modifier.dart' show | 22 import '../modifier.dart' show |
| 19 abstractMask; | 23 abstractMask; |
| 20 | 24 |
| 21 import 'dill_member_builder.dart' show | 25 import 'dill_member_builder.dart' show |
| 22 DillMemberBuilder; | 26 DillMemberBuilder; |
| 23 | 27 |
| 24 import 'dill_library_builder.dart' show | 28 import 'dill_library_builder.dart' show |
| 25 DillLibraryBuilder; | 29 DillLibraryBuilder; |
| 26 | 30 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 43 } else { | 47 } else { |
| 44 DillMemberBuilder existing = members[name]; | 48 DillMemberBuilder existing = members[name]; |
| 45 if (existing == null) { | 49 if (existing == null) { |
| 46 members[name] = builder; | 50 members[name] = builder; |
| 47 } else { | 51 } else { |
| 48 existing.next = builder; | 52 existing.next = builder; |
| 49 } | 53 } |
| 50 } | 54 } |
| 51 } | 55 } |
| 52 | 56 |
| 57 /// Returns true if this class is the result of applying a mixin to its | |
| 58 /// superclass. | |
| 59 bool get isMixinApplication => cls.isMixinApplication; | |
|
karlklose
2017/02/15 09:09:30
Should this be `isMixinApplicationBuilder`?
ahe
2017/02/15 09:36:50
Generally, I haven't used the Builder prefix in bo
karlklose
2017/02/15 09:43:57
It made sense to me to have a prefix here to make
| |
| 60 | |
| 61 TypeBuilder get mixedInType => internalError("Not implemented."); | |
| 62 | |
| 53 Builder findConstructorOrFactory(String name) => constructors[name]; | 63 Builder findConstructorOrFactory(String name) => constructors[name]; |
| 54 } | 64 } |
| 55 | 65 |
| 56 int computeModifiers(Class cls) { | 66 int computeModifiers(Class cls) { |
| 57 return cls.isAbstract ? abstractMask : 0; | 67 return cls.isAbstract ? abstractMask : 0; |
| 58 } | 68 } |
| OLD | NEW |