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 |
8 Future; | 8 Future; |
9 | 9 |
10 import 'package:kernel/ast.dart' show | 10 import 'package:kernel/ast.dart' show |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 class DillTarget extends TargetImplementation { | 39 class DillTarget extends TargetImplementation { |
40 bool isLoaded = false; | 40 bool isLoaded = false; |
41 DillLoader loader; | 41 DillLoader loader; |
42 | 42 |
43 DillTarget(Ticker ticker, TranslateUri uriTranslator) | 43 DillTarget(Ticker ticker, TranslateUri uriTranslator) |
44 : super(ticker, uriTranslator) { | 44 : super(ticker, uriTranslator) { |
45 loader = new DillLoader(this); | 45 loader = new DillLoader(this); |
46 } | 46 } |
47 | 47 |
| 48 void addLineStarts(Uri uri, List<int> lineStarts) { |
| 49 internalError("Unsupported operation."); |
| 50 } |
| 51 |
48 void read(Uri uri) { | 52 void read(Uri uri) { |
49 if (loader.input == null) { | 53 if (loader.input == null) { |
50 loader.input = uri; | 54 loader.input = uri; |
51 } else { | 55 } else { |
52 inputError(uri, -1, "Can only read one dill file."); | 56 inputError(uri, -1, "Can only read one dill file."); |
53 } | 57 } |
54 } | 58 } |
55 | 59 |
56 Future<Null> writeProgram(Uri uri, AstKind kind) { | 60 Future<Null> writeProgram(Uri uri, AstKind kind) { |
57 return internalError("not implemented."); | 61 return internalError("not implemented."); |
(...skipping 18 matching lines...) Expand all Loading... |
76 } | 80 } |
77 | 81 |
78 void breakCycle(ClassBuilder cls) { | 82 void breakCycle(ClassBuilder cls) { |
79 } | 83 } |
80 | 84 |
81 Class get objectClass { | 85 Class get objectClass { |
82 KernelClassBuilder builder = loader.coreLibrary.exports["Object"]; | 86 KernelClassBuilder builder = loader.coreLibrary.exports["Object"]; |
83 return builder.cls; | 87 return builder.cls; |
84 } | 88 } |
85 } | 89 } |
OLD | NEW |