| 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 | |
| 6 // significant change. Please see the README file for more information. | |
| 7 | |
| 8 library engine.sdk; | 5 library engine.sdk; |
| 9 | 6 |
| 10 import 'dart:collection'; | 7 import 'dart:collection'; |
| 11 | 8 |
| 12 import 'ast.dart'; | 9 import 'ast.dart'; |
| 13 import 'engine.dart' show AnalysisContext; | 10 import 'engine.dart' show AnalysisContext; |
| 14 import 'source.dart' show ContentCache, Source, UriKind; | 11 import 'source.dart' show ContentCache, Source, UriKind; |
| 15 | 12 |
| 16 /** | 13 /** |
| 17 * A Dart SDK installed in a specified location. | 14 * A Dart SDK installed in a specified location. |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 /** | 293 /** |
| 297 * The bit mask used to access the bit representing the flag indicating | 294 * The bit mask used to access the bit representing the flag indicating |
| 298 * whether a library is intended to work on the VM platform. | 295 * whether a library is intended to work on the VM platform. |
| 299 */ | 296 */ |
| 300 static int VM_PLATFORM = 2; | 297 static int VM_PLATFORM = 2; |
| 301 | 298 |
| 302 /** | 299 /** |
| 303 * The short name of the library. This is the name used after 'dart:' in a | 300 * The short name of the library. This is the name used after 'dart:' in a |
| 304 * URI. | 301 * URI. |
| 305 */ | 302 */ |
| 306 String _shortName = null; | 303 final String shortName; |
| 307 | 304 |
| 308 /** | 305 /** |
| 309 * The path to the file defining the library. The path is relative to the | 306 * The path to the file defining the library. The path is relative to the |
| 310 * 'lib' directory within the SDK. | 307 * 'lib' directory within the SDK. |
| 311 */ | 308 */ |
| 312 String path = null; | 309 String path = null; |
| 313 | 310 |
| 314 /** | 311 /** |
| 315 * The name of the category containing the library. Unless otherwise specified | 312 * The name of the category containing the library. Unless otherwise specified |
| 316 * in the libraries file all libraries are assumed to be shared between server | 313 * in the libraries file all libraries are assumed to be shared between server |
| (...skipping 13 matching lines...) Expand all Loading... |
| 330 | 327 |
| 331 /** | 328 /** |
| 332 * An encoding of which platforms this library is intended to work on. | 329 * An encoding of which platforms this library is intended to work on. |
| 333 */ | 330 */ |
| 334 int _platforms = 0; | 331 int _platforms = 0; |
| 335 | 332 |
| 336 /** | 333 /** |
| 337 * Initialize a newly created library to represent the library with the given | 334 * Initialize a newly created library to represent the library with the given |
| 338 * [name]. | 335 * [name]. |
| 339 */ | 336 */ |
| 340 SdkLibraryImpl(String name) { | 337 SdkLibraryImpl(this.shortName); |
| 341 this._shortName = name; | |
| 342 } | |
| 343 | 338 |
| 344 /** | 339 /** |
| 345 * Set whether the library is documented. | 340 * Set whether the library is documented. |
| 346 */ | 341 */ |
| 347 void set documented(bool documented) { | 342 void set documented(bool documented) { |
| 348 this._documented = documented; | 343 this._documented = documented; |
| 349 } | 344 } |
| 350 | 345 |
| 351 /** | 346 /** |
| 352 * Set whether the library is an implementation library. | 347 * Set whether the library is an implementation library. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 366 | 361 |
| 367 @override | 362 @override |
| 368 bool get isInternal => "Internal" == category; | 363 bool get isInternal => "Internal" == category; |
| 369 | 364 |
| 370 @override | 365 @override |
| 371 bool get isShared => category == "Shared"; | 366 bool get isShared => category == "Shared"; |
| 372 | 367 |
| 373 @override | 368 @override |
| 374 bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0; | 369 bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0; |
| 375 | 370 |
| 376 @override | |
| 377 String get shortName => _shortName; | |
| 378 | |
| 379 /** | 371 /** |
| 380 * Record that this library can be compiled to JavaScript by dart2js. | 372 * Record that this library can be compiled to JavaScript by dart2js. |
| 381 */ | 373 */ |
| 382 void setDart2JsLibrary() { | 374 void setDart2JsLibrary() { |
| 383 _platforms |= DART2JS_PLATFORM; | 375 _platforms |= DART2JS_PLATFORM; |
| 384 } | 376 } |
| 385 | 377 |
| 386 /** | 378 /** |
| 387 * Record that this library can be run on the VM. | 379 * Record that this library can be run on the VM. |
| 388 */ | 380 */ |
| 389 void setVmLibrary() { | 381 void setVmLibrary() { |
| 390 _platforms |= VM_PLATFORM; | 382 _platforms |= VM_PLATFORM; |
| 391 } | 383 } |
| 392 } | 384 } |
| OLD | NEW |