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.kernel_library_builder; | 5 library fasta.kernel_library_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart'; | 7 import 'package:kernel/ast.dart'; |
| 8 | 8 |
| 9 import 'package:kernel/clone.dart' show | 9 import 'package:kernel/clone.dart' show |
| 10 CloneVisitor; | 10 CloneVisitor; |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 340 int finishTypeVariables(ClassBuilder object) { | 340 int finishTypeVariables(ClassBuilder object) { |
| 341 int count = boundlessTypeVariables.length; | 341 int count = boundlessTypeVariables.length; |
| 342 for (KernelTypeVariableBuilder builder in boundlessTypeVariables) { | 342 for (KernelTypeVariableBuilder builder in boundlessTypeVariables) { |
| 343 builder.finish(object); | 343 builder.finish(object); |
| 344 } | 344 } |
| 345 boundlessTypeVariables.clear(); | 345 boundlessTypeVariables.clear(); |
| 346 return count; | 346 return count; |
| 347 } | 347 } |
| 348 | 348 |
| 349 @override | 349 @override |
| 350 void includePart(KernelLibraryBuilder part) { | 350 void includePart(covariant KernelLibraryBuilder part) { |
|
Siggi Cherem (dart-lang)
2017/02/15 22:05:25
happy to do it differently here, since the other c
| |
| 351 super.includePart(part); | 351 super.includePart(part); |
| 352 nativeMethods.addAll(part.nativeMethods); | 352 nativeMethods.addAll(part.nativeMethods); |
| 353 boundlessTypeVariables.addAll(part.boundlessTypeVariables); | 353 boundlessTypeVariables.addAll(part.boundlessTypeVariables); |
| 354 mixinApplicationClasses.addAll(part.mixinApplicationClasses); | 354 mixinApplicationClasses.addAll(part.mixinApplicationClasses); |
| 355 } | 355 } |
| 356 } | 356 } |
| 357 | 357 |
| 358 bool isConstructorName(String name, String className) { | 358 bool isConstructorName(String name, String className) { |
| 359 if (name.startsWith(className)) { | 359 if (name.startsWith(className)) { |
| 360 if (name.length == className.length) return true; | 360 if (name.length == className.length) return true; |
| 361 if (name.startsWith(".", className.length)) return true; | 361 if (name.startsWith(".", className.length)) return true; |
| 362 } | 362 } |
| 363 return false; | 363 return false; |
| 364 } | 364 } |
| OLD | NEW |