| 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_target; | 5 library fasta.kernel_target; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:kernel/ast.dart' | 9 import 'package:kernel/ast.dart' |
| 10 show | 10 show |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 installDefaultSupertypes(); | 246 installDefaultSupertypes(); |
| 247 installDefaultConstructors(sourceClasses); | 247 installDefaultConstructors(sourceClasses); |
| 248 loader.resolveConstructors(); | 248 loader.resolveConstructors(); |
| 249 loader.finishTypeVariables(objectClassBuilder); | 249 loader.finishTypeVariables(objectClassBuilder); |
| 250 program = | 250 program = |
| 251 link(new List<Library>.from(loader.libraries), nameRoot: nameRoot); | 251 link(new List<Library>.from(loader.libraries), nameRoot: nameRoot); |
| 252 loader.computeHierarchy(program); | 252 loader.computeHierarchy(program); |
| 253 loader.checkOverrides(sourceClasses); | 253 loader.checkOverrides(sourceClasses); |
| 254 loader.prepareInitializerInference(); | 254 loader.prepareInitializerInference(); |
| 255 loader.performInitializerInference(); | 255 loader.performInitializerInference(); |
| 256 loader.computeFormalSafety(); |
| 256 } on deprecated_InputError catch (e) { | 257 } on deprecated_InputError catch (e) { |
| 257 handleInputError(e, isFullProgram: false); | 258 handleInputError(e, isFullProgram: false); |
| 258 } catch (e, s) { | 259 } catch (e, s) { |
| 259 return reportCrash(e, s, loader?.currentUriForCrashReporting); | 260 return reportCrash(e, s, loader?.currentUriForCrashReporting); |
| 260 } | 261 } |
| 261 return program; | 262 return program; |
| 262 } | 263 } |
| 263 | 264 |
| 264 /// Build the kernel representation of the program loaded by this target. The | 265 /// Build the kernel representation of the program loaded by this target. The |
| 265 /// program will contain full bodies for the code loaded from sources, and | 266 /// program will contain full bodies for the code loaded from sources, and |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 } | 671 } |
| 671 for (Constructor constructor in superclass.constructors) { | 672 for (Constructor constructor in superclass.constructors) { |
| 672 if (constructor.name.name.isEmpty) { | 673 if (constructor.name.name.isEmpty) { |
| 673 return constructor.function.requiredParameterCount == 0 | 674 return constructor.function.requiredParameterCount == 0 |
| 674 ? constructor | 675 ? constructor |
| 675 : null; | 676 : null; |
| 676 } | 677 } |
| 677 } | 678 } |
| 678 return null; | 679 return null; |
| 679 } | 680 } |
| OLD | NEW |