| 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 'dart:io' show File; | 9 import 'dart:io' show File; |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 SourceLoader<Library> createLoader() => | 126 SourceLoader<Library> createLoader() => |
| 127 new SourceLoader<Library>(fileSystem, this); | 127 new SourceLoader<Library>(fileSystem, this); |
| 128 | 128 |
| 129 void addSourceInformation( | 129 void addSourceInformation( |
| 130 Uri uri, List<int> lineStarts, List<int> sourceCode) { | 130 Uri uri, List<int> lineStarts, List<int> sourceCode) { |
| 131 String fileUri = relativizeUri(uri); | 131 String fileUri = relativizeUri(uri); |
| 132 uriToSource[fileUri] = new Source(lineStarts, sourceCode); | 132 uriToSource[fileUri] = new Source(lineStarts, sourceCode); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void read(Uri uri) { | 135 void read(Uri uri) { |
| 136 loader.read(uri); | 136 loader.read(uri, -1); |
| 137 } | 137 } |
| 138 | 138 |
| 139 LibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri) { | 139 LibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri) { |
| 140 if (dillTarget.isLoaded) { | 140 if (dillTarget.isLoaded) { |
| 141 var builder = dillTarget.loader.builders[uri]; | 141 var builder = dillTarget.loader.builders[uri]; |
| 142 if (builder != null) { | 142 if (builder != null) { |
| 143 return builder; | 143 return builder; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 return new KernelLibraryBuilder(uri, fileUri, loader); | 146 return new KernelLibraryBuilder(uri, fileUri, loader); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 } | 713 } |
| 714 for (Constructor constructor in superclass.constructors) { | 714 for (Constructor constructor in superclass.constructors) { |
| 715 if (constructor.name.name.isEmpty) { | 715 if (constructor.name.name.isEmpty) { |
| 716 return constructor.function.requiredParameterCount == 0 | 716 return constructor.function.requiredParameterCount == 0 |
| 717 ? constructor | 717 ? constructor |
| 718 : null; | 718 : null; |
| 719 } | 719 } |
| 720 } | 720 } |
| 721 return null; | 721 return null; |
| 722 } | 722 } |
| OLD | NEW |