| 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; | 8 library engine.sdk; |
| 9 | 9 |
| 10 import 'source.dart' show ContentCache, Source, UriKind; | 10 import 'source.dart' show ContentCache, Source, UriKind; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * Initialize a newly created library to represent the library with the given
name. | 133 * Initialize a newly created library to represent the library with the given
name. |
| 134 * | 134 * |
| 135 * @param name the short name of the library | 135 * @param name the short name of the library |
| 136 */ | 136 */ |
| 137 SdkLibraryImpl(String name) { | 137 SdkLibraryImpl(String name) { |
| 138 this._shortName = name; | 138 this._shortName = name; |
| 139 } | 139 } |
| 140 | 140 |
| 141 @override |
| 141 String get shortName => _shortName; | 142 String get shortName => _shortName; |
| 142 | 143 |
| 144 @override |
| 143 bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0; | 145 bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0; |
| 144 | 146 |
| 147 @override |
| 145 bool get isDocumented => _documented; | 148 bool get isDocumented => _documented; |
| 146 | 149 |
| 150 @override |
| 147 bool get isImplementation => _implementation; | 151 bool get isImplementation => _implementation; |
| 148 | 152 |
| 153 @override |
| 149 bool get isInternal => "Internal" == category; | 154 bool get isInternal => "Internal" == category; |
| 150 | 155 |
| 151 /** | 156 /** |
| 152 * Return `true` if library can be used for both client and server | 157 * Return `true` if library can be used for both client and server |
| 153 */ | 158 */ |
| 159 @override |
| 154 bool get isShared => category == "Shared"; | 160 bool get isShared => category == "Shared"; |
| 155 | 161 |
| 156 /** | 162 /** |
| 157 * Return `true` if this library can be run on the VM. | 163 * Return `true` if this library can be run on the VM. |
| 158 * | 164 * |
| 159 * @return `true` if this library can be run on the VM | 165 * @return `true` if this library can be run on the VM |
| 160 */ | 166 */ |
| 167 @override |
| 161 bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0; | 168 bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0; |
| 162 | 169 |
| 163 /** | 170 /** |
| 164 * Record that this library can be compiled to JavaScript by dart2js. | 171 * Record that this library can be compiled to JavaScript by dart2js. |
| 165 */ | 172 */ |
| 166 void setDart2JsLibrary() { | 173 void setDart2JsLibrary() { |
| 167 _platforms |= DART2JS_PLATFORM; | 174 _platforms |= DART2JS_PLATFORM; |
| 168 } | 175 } |
| 169 | 176 |
| 170 /** | 177 /** |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 } | 262 } |
| 256 | 263 |
| 257 /** | 264 /** |
| 258 * Return the library map that was populated by visiting the AST structure par
sed from the | 265 * Return the library map that was populated by visiting the AST structure par
sed from the |
| 259 * contents of the libraries file. | 266 * contents of the libraries file. |
| 260 * | 267 * |
| 261 * @return the library map describing the contents of the SDK | 268 * @return the library map describing the contents of the SDK |
| 262 */ | 269 */ |
| 263 LibraryMap get librariesMap => _librariesMap; | 270 LibraryMap get librariesMap => _librariesMap; |
| 264 | 271 |
| 272 @override |
| 265 Object visitMapLiteralEntry(MapLiteralEntry node) { | 273 Object visitMapLiteralEntry(MapLiteralEntry node) { |
| 266 String libraryName = null; | 274 String libraryName = null; |
| 267 Expression key = node.key; | 275 Expression key = node.key; |
| 268 if (key is SimpleStringLiteral) { | 276 if (key is SimpleStringLiteral) { |
| 269 libraryName = "${_LIBRARY_PREFIX}${key.value}"; | 277 libraryName = "${_LIBRARY_PREFIX}${key.value}"; |
| 270 } | 278 } |
| 271 Expression value = node.value; | 279 Expression value = node.value; |
| 272 if (value is InstanceCreationExpression) { | 280 if (value is InstanceCreationExpression) { |
| 273 SdkLibraryImpl library = new SdkLibraryImpl(libraryName); | 281 SdkLibraryImpl library = new SdkLibraryImpl(libraryName); |
| 274 List<Expression> arguments = value.argumentList.arguments; | 282 List<Expression> arguments = value.argumentList.arguments; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 433 |
| 426 /** | 434 /** |
| 427 * Return the source representing the library with the given `dart:` URI, or `
null` if | 435 * Return the source representing the library with the given `dart:` URI, or `
null` if |
| 428 * the given URI does not denote a library in this SDK. | 436 * the given URI does not denote a library in this SDK. |
| 429 * | 437 * |
| 430 * @param dartUri the URI of the library to be returned | 438 * @param dartUri the URI of the library to be returned |
| 431 * @return the source representing the specified library | 439 * @return the source representing the specified library |
| 432 */ | 440 */ |
| 433 Source mapDartUri(String dartUri); | 441 Source mapDartUri(String dartUri); |
| 434 } | 442 } |
| OLD | NEW |