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 13 matching lines...) Expand all Loading... | |
| 24 | 24 |
| 25 class DillTarget extends TargetImplementation { | 25 class DillTarget extends TargetImplementation { |
| 26 bool isLoaded = false; | 26 bool isLoaded = false; |
| 27 DillLoader loader; | 27 DillLoader loader; |
| 28 | 28 |
| 29 DillTarget(Ticker ticker, TranslateUri uriTranslator) | 29 DillTarget(Ticker ticker, TranslateUri uriTranslator) |
| 30 : super(ticker, uriTranslator) { | 30 : super(ticker, uriTranslator) { |
| 31 loader = new DillLoader(this); | 31 loader = new DillLoader(this); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void addLineStarts(Uri uri, List<int> lineStarts) { | 34 void addSourceInformation(Uri uri, List<int> lineStarts, String sourceCode) { |
|
ahe
2017/03/03 12:30:32
This should probably be List<int>, not String.
| |
| 35 internalError("Unsupported operation."); | 35 internalError("Unsupported operation."); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void read(Uri uri) { | 38 void read(Uri uri) { |
| 39 if (loader.input == null) { | 39 if (loader.input == null) { |
| 40 loader.input = uri; | 40 loader.input = uri; |
| 41 } else { | 41 } else { |
| 42 inputError(uri, -1, "Can only read one dill file."); | 42 inputError(uri, -1, "Can only read one dill file."); |
| 43 } | 43 } |
| 44 } | 44 } |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 64 return null; | 64 return null; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void breakCycle(ClassBuilder cls) {} | 67 void breakCycle(ClassBuilder cls) {} |
| 68 | 68 |
| 69 Class get objectClass { | 69 Class get objectClass { |
| 70 KernelClassBuilder builder = loader.coreLibrary.exports["Object"]; | 70 KernelClassBuilder builder = loader.coreLibrary.exports["Object"]; |
| 71 return builder.cls; | 71 return builder.cls; |
| 72 } | 72 } |
| 73 } | 73 } |
| OLD | NEW |