| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.sdk.io; | 8 library engine.sdk.io; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 * The file containing the VM executable. | 76 * The file containing the VM executable. |
| 77 */ | 77 */ |
| 78 JavaFile _vmExecutable; | 78 JavaFile _vmExecutable; |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * A mapping from Dart library URI's to the library represented by that URI. | 81 * A mapping from Dart library URI's to the library represented by that URI. |
| 82 */ | 82 */ |
| 83 LibraryMap _libraryMap; | 83 LibraryMap _libraryMap; |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * The default SDK, or `null` if the default SDK either has not yet been creat
ed or cannot |
| 87 * be created for some reason. |
| 88 */ |
| 89 static DirectoryBasedDartSdk _DEFAULT_SDK; |
| 90 |
| 91 /** |
| 86 * The name of the directory within the SDK directory that contains executable
s. | 92 * The name of the directory within the SDK directory that contains executable
s. |
| 87 */ | 93 */ |
| 88 static String _BIN_DIRECTORY_NAME = "bin"; | 94 static String _BIN_DIRECTORY_NAME = "bin"; |
| 89 | 95 |
| 90 /** | 96 /** |
| 91 * The name of the directory on non-Mac that contains dartium. | 97 * The name of the directory on non-Mac that contains dartium. |
| 92 */ | 98 */ |
| 93 static String _DARTIUM_DIRECTORY_NAME = "chromium"; | 99 static String _DARTIUM_DIRECTORY_NAME = "chromium"; |
| 94 | 100 |
| 95 /** | 101 /** |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 */ | 191 */ |
| 186 static String _VM_EXECUTABLE_NAME = "dart"; | 192 static String _VM_EXECUTABLE_NAME = "dart"; |
| 187 | 193 |
| 188 /** | 194 /** |
| 189 * Return the default Dart SDK, or `null` if the directory containing the defa
ult SDK cannot | 195 * Return the default Dart SDK, or `null` if the directory containing the defa
ult SDK cannot |
| 190 * be determined (or does not exist). | 196 * be determined (or does not exist). |
| 191 * | 197 * |
| 192 * @return the default Dart SDK | 198 * @return the default Dart SDK |
| 193 */ | 199 */ |
| 194 static DirectoryBasedDartSdk get defaultSdk { | 200 static DirectoryBasedDartSdk get defaultSdk { |
| 195 JavaFile sdkDirectory = defaultSdkDirectory; | 201 if (_DEFAULT_SDK == null) { |
| 196 if (sdkDirectory == null) { | 202 JavaFile sdkDirectory = defaultSdkDirectory; |
| 197 return null; | 203 if (sdkDirectory == null) { |
| 204 return null; |
| 205 } |
| 206 _DEFAULT_SDK = new DirectoryBasedDartSdk(sdkDirectory); |
| 198 } | 207 } |
| 199 return new DirectoryBasedDartSdk(sdkDirectory); | 208 return _DEFAULT_SDK; |
| 200 } | 209 } |
| 201 | 210 |
| 202 /** | 211 /** |
| 203 * Return the default directory for the Dart SDK, or `null` if the directory c
annot be | 212 * Return the default directory for the Dart SDK, or `null` if the directory c
annot be |
| 204 * determined (or does not exist). The default directory is provided by a [Sys
tem] property | 213 * determined (or does not exist). The default directory is provided by a [Sys
tem] property |
| 205 * named `com.google.dart.sdk`. | 214 * named `com.google.dart.sdk`. |
| 206 * | 215 * |
| 207 * @return the default directory for the Dart SDK | 216 * @return the default directory for the Dart SDK |
| 208 */ | 217 */ |
| 209 static JavaFile get defaultSdkDirectory { | 218 static JavaFile get defaultSdkDirectory { |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 Parser parser = new Parser(source, errorListener); | 605 Parser parser = new Parser(source, errorListener); |
| 597 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); | 606 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); |
| 598 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(_useDart2jsPaths); | 607 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(_useDart2jsPaths); |
| 599 // If any syntactic errors were found then don't try to visit the AST struct
ure. | 608 // If any syntactic errors were found then don't try to visit the AST struct
ure. |
| 600 if (!errorListener.errorReported) { | 609 if (!errorListener.errorReported) { |
| 601 unit.accept(libraryBuilder); | 610 unit.accept(libraryBuilder); |
| 602 } | 611 } |
| 603 return libraryBuilder.librariesMap; | 612 return libraryBuilder.librariesMap; |
| 604 } | 613 } |
| 605 } | 614 } |
| OLD | NEW |