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_target; | 5 library fasta.dill_target; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:kernel/ast.dart' show Class; | 9 import 'package:kernel/ast.dart' show Class; |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 : super(ticker, uriTranslator) { | 30 : super(ticker, uriTranslator) { |
| 31 loader = new DillLoader(this); | 31 loader = new DillLoader(this); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void addSourceInformation( | 34 void addSourceInformation( |
| 35 Uri uri, List<int> lineStarts, List<int> sourceCode) { | 35 Uri uri, List<int> lineStarts, List<int> sourceCode) { |
| 36 internalError("Unsupported operation."); | 36 internalError("Unsupported operation."); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void read(Uri uri) { | 39 void read(Uri uri) { |
| 40 if (loader.input == null) { | 40 internalError("not implemented"); |
|
ahe
2017/05/11 10:09:49
"Internal error: Unsupported operation."
| |
| 41 loader.input = uri; | |
| 42 } else { | |
| 43 inputError(uri, -1, "Can only read one dill file."); | |
| 44 } | |
| 45 } | 41 } |
| 46 | 42 |
| 47 Future<Null> writeProgram(Uri uri) { | 43 Future<Null> writeProgram(Uri uri) { |
| 48 return internalError("not implemented."); | 44 return internalError("not implemented."); |
| 49 } | 45 } |
| 50 | 46 |
| 51 Future<Null> writeOutline(Uri uri) async { | 47 Future<Null> writeOutline(Uri uri) async { |
| 52 if (loader.input == null) return null; | 48 if (loader.program == null) return null; |
| 53 await loader.buildOutlines(); | 49 await loader.buildOutlines(); |
| 54 isLoaded = true; | 50 isLoaded = true; |
| 55 return null; | 51 return null; |
| 56 } | 52 } |
| 57 | 53 |
| 58 DillLibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri) { | 54 DillLibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri) { |
| 59 return new DillLibraryBuilder(uri, loader); | 55 return new DillLibraryBuilder(uri, loader); |
| 60 } | 56 } |
| 61 | 57 |
| 62 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {} | 58 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {} |
| 63 | 59 |
| 64 List<ClassBuilder> collectAllClasses() { | 60 List<ClassBuilder> collectAllClasses() { |
| 65 return null; | 61 return null; |
| 66 } | 62 } |
| 67 | 63 |
| 68 void breakCycle(ClassBuilder cls) {} | 64 void breakCycle(ClassBuilder cls) {} |
| 69 | 65 |
| 70 Class get objectClass => loader.coreLibrary["Object"].target; | 66 Class get objectClass => loader.coreLibrary["Object"].target; |
| 71 } | 67 } |
| OLD | NEW |