| 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_target; | 5 library fasta.dill_target; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show Future; |
| 8 Future; | |
| 9 | 8 |
| 10 import 'package:kernel/ast.dart' show | 9 import 'package:kernel/ast.dart' show Class; |
| 11 Class; | |
| 12 | 10 |
| 13 import 'dill_loader.dart' show | 11 import 'dill_loader.dart' show DillLoader; |
| 14 DillLoader; | |
| 15 | 12 |
| 16 import '../errors.dart' show | 13 import '../errors.dart' show inputError, internalError; |
| 17 inputError, | |
| 18 internalError; | |
| 19 | 14 |
| 20 import '../target_implementation.dart' show | 15 import '../target_implementation.dart' show TargetImplementation; |
| 21 TargetImplementation; | |
| 22 | 16 |
| 23 import '../ticker.dart' show | 17 import '../ticker.dart' show Ticker; |
| 24 Ticker; | |
| 25 | 18 |
| 26 import '../translate_uri.dart' show | 19 import '../translate_uri.dart' show TranslateUri; |
| 27 TranslateUri; | |
| 28 | 20 |
| 29 import '../ast_kind.dart' show | 21 import '../ast_kind.dart' show AstKind; |
| 30 AstKind; | |
| 31 | 22 |
| 32 import '../kernel/kernel_builder.dart' show | 23 import '../kernel/kernel_builder.dart' show ClassBuilder, KernelClassBuilder; |
| 33 ClassBuilder, | |
| 34 KernelClassBuilder; | |
| 35 | 24 |
| 36 import 'dill_library_builder.dart' show | 25 import 'dill_library_builder.dart' show DillLibraryBuilder; |
| 37 DillLibraryBuilder; | |
| 38 | 26 |
| 39 class DillTarget extends TargetImplementation { | 27 class DillTarget extends TargetImplementation { |
| 40 bool isLoaded = false; | 28 bool isLoaded = false; |
| 41 DillLoader loader; | 29 DillLoader loader; |
| 42 | 30 |
| 43 DillTarget(Ticker ticker, TranslateUri uriTranslator) | 31 DillTarget(Ticker ticker, TranslateUri uriTranslator) |
| 44 : super(ticker, uriTranslator) { | 32 : super(ticker, uriTranslator) { |
| 45 loader = new DillLoader(this); | 33 loader = new DillLoader(this); |
| 46 } | 34 } |
| 47 | 35 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 65 if (loader.input == null) return null; | 53 if (loader.input == null) return null; |
| 66 await loader.buildOutlines(); | 54 await loader.buildOutlines(); |
| 67 isLoaded = true; | 55 isLoaded = true; |
| 68 return null; | 56 return null; |
| 69 } | 57 } |
| 70 | 58 |
| 71 DillLibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri) { | 59 DillLibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri) { |
| 72 return new DillLibraryBuilder(uri, loader); | 60 return new DillLibraryBuilder(uri, loader); |
| 73 } | 61 } |
| 74 | 62 |
| 75 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) { | 63 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {} |
| 76 } | |
| 77 | 64 |
| 78 List<ClassBuilder> collectAllClasses() { | 65 List<ClassBuilder> collectAllClasses() { |
| 79 return null; | 66 return null; |
| 80 } | 67 } |
| 81 | 68 |
| 82 void breakCycle(ClassBuilder cls) { | 69 void breakCycle(ClassBuilder cls) {} |
| 83 } | |
| 84 | 70 |
| 85 Class get objectClass { | 71 Class get objectClass { |
| 86 KernelClassBuilder builder = loader.coreLibrary.exports["Object"]; | 72 KernelClassBuilder builder = loader.coreLibrary.exports["Object"]; |
| 87 return builder.cls; | 73 return builder.cls; |
| 88 } | 74 } |
| 89 } | 75 } |
| OLD | NEW |