| 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 'dart:collection'; | 10 import 'dart:collection'; |
| 11 | 11 |
| 12 import 'ast.dart'; | 12 import 'ast.dart'; |
| 13 import 'engine.dart' show AnalysisContext; | 13 import 'engine.dart' show AnalysisContext; |
| 14 import 'source.dart' show ContentCache, Source, UriKind; | 14 import 'source.dart' show ContentCache, Source, UriKind; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Instances of the class `DartSdk` represent a Dart SDK installed in a specifie
d location. | 17 * A Dart SDK installed in a specified location. |
| 18 */ | 18 */ |
| 19 abstract class DartSdk { | 19 abstract class DartSdk { |
| 20 /** | 20 /** |
| 21 * The short name of the dart SDK async library. | 21 * The short name of the dart SDK 'async' library. |
| 22 */ | 22 */ |
| 23 static final String DART_ASYNC = "dart:async"; | 23 static final String DART_ASYNC = "dart:async"; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * The short name of the dart SDK core library. | 26 * The short name of the dart SDK 'core' library. |
| 27 */ | 27 */ |
| 28 static final String DART_CORE = "dart:core"; | 28 static final String DART_CORE = "dart:core"; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * The short name of the dart SDK html library. | 31 * The short name of the dart SDK 'html' library. |
| 32 */ | 32 */ |
| 33 static final String DART_HTML = "dart:html"; | 33 static final String DART_HTML = "dart:html"; |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * The version number that is returned when the real version number could not
be determined. | 36 * The version number that is returned when the real version number could not |
| 37 * be determined. |
| 37 */ | 38 */ |
| 38 static final String DEFAULT_VERSION = "0"; | 39 static final String DEFAULT_VERSION = "0"; |
| 39 | 40 |
| 40 /** | 41 /** |
| 41 * Return the [AnalysisContext] used for all of the sources in this [DartSdk]. | 42 * Return the analysis context used for all of the sources in this [DartSdk]. |
| 42 * | |
| 43 * @return the [AnalysisContext] used for all of the sources in this [DartSdk] | |
| 44 */ | 43 */ |
| 45 AnalysisContext get context; | 44 AnalysisContext get context; |
| 46 | 45 |
| 47 /** | 46 /** |
| 48 * Return an array containing all of the libraries defined in this SDK. | 47 * Return a list containing all of the libraries defined in this SDK. |
| 49 * | |
| 50 * @return the libraries defined in this SDK | |
| 51 */ | 48 */ |
| 52 List<SdkLibrary> get sdkLibraries; | 49 List<SdkLibrary> get sdkLibraries; |
| 53 | 50 |
| 54 /** | 51 /** |
| 55 * Return the revision number of this SDK, or `"0"` if the revision number can
not be | 52 * Return the revision number of this SDK, or `"0"` if the revision number |
| 56 * discovered. | 53 * cannot be discovered. |
| 57 * | |
| 58 * @return the revision number of this SDK | |
| 59 */ | 54 */ |
| 60 String get sdkVersion; | 55 String get sdkVersion; |
| 61 | 56 |
| 62 /** | 57 /** |
| 63 * Return an array containing the library URI's for the libraries defined in t
his SDK. | 58 * Return a list containing the library URI's for the libraries defined in |
| 64 * | 59 * this SDK. |
| 65 * @return the library URI's for the libraries defined in this SDK | |
| 66 */ | 60 */ |
| 67 List<String> get uris; | 61 List<String> get uris; |
| 68 | 62 |
| 69 /** | 63 /** |
| 70 * Return a source representing the given file: URI if the file is in this SDK
, or `null` if | 64 * Return a source representing the given 'file:' [uri] if the file is in this |
| 71 * the file is not in this SDK. | 65 * SDK, or `null` if the file is not in this SDK. |
| 72 * | |
| 73 * @param uri the file URI for which a source is to be returned | |
| 74 * @return the source representing the given URI | |
| 75 * @throws | |
| 76 */ | 66 */ |
| 77 Source fromFileUri(Uri uri); | 67 Source fromFileUri(Uri uri); |
| 78 | 68 |
| 79 /** | 69 /** |
| 80 * Return the library representing the library with the given `dart:` URI, or
`null` | 70 * Return the library representing the library with the given 'dart:' [uri], |
| 81 * if the given URI does not denote a library in this SDK. | 71 * or `null` if the given URI does not denote a library in this SDK. |
| 82 * | |
| 83 * @param dartUri the URI of the library to be returned | |
| 84 * @return the SDK library object | |
| 85 */ | 72 */ |
| 86 SdkLibrary getSdkLibrary(String dartUri); | 73 SdkLibrary getSdkLibrary(String uri); |
| 87 | 74 |
| 88 /** | 75 /** |
| 89 * Return the source representing the library with the given `dart:` URI, or `
null` if | 76 * Return the source representing the library with the given 'dart:' [uri], or |
| 90 * the given URI does not denote a library in this SDK. | 77 * `null` if the given URI does not denote a library in this SDK. |
| 91 * | |
| 92 * @param dartUri the URI of the library to be returned | |
| 93 * @return the source representing the specified library | |
| 94 */ | 78 */ |
| 95 Source mapDartUri(String dartUri); | 79 Source mapDartUri(String uri); |
| 96 } | 80 } |
| 97 | 81 |
| 98 /** | 82 /** |
| 99 * Instances of the class `LibraryMap` map Dart library URI's to the [SdkLibrary
Impl | 83 * A map from Dart library URI's to the [SdkLibraryImpl] representing that |
| 100 ]. | 84 * library. |
| 101 */ | 85 */ |
| 102 class LibraryMap { | 86 class LibraryMap { |
| 103 /** | 87 /** |
| 104 * A table mapping Dart library URI's to the library. | 88 * A table mapping Dart library URI's to the library. |
| 105 */ | 89 */ |
| 106 HashMap<String, SdkLibraryImpl> _libraryMap = | 90 HashMap<String, SdkLibraryImpl> _libraryMap = |
| 107 new HashMap<String, SdkLibraryImpl>(); | 91 new HashMap<String, SdkLibraryImpl>(); |
| 108 | 92 |
| 109 /** | 93 /** |
| 110 * Return an array containing all the sdk libraries [SdkLibraryImpl] in the ma
pping | 94 * Return a list containing all of the sdk libraries in this mapping. |
| 111 * | |
| 112 * @return the sdk libraries in the mapping | |
| 113 */ | 95 */ |
| 114 List<SdkLibrary> get sdkLibraries => new List.from(_libraryMap.values); | 96 List<SdkLibrary> get sdkLibraries => new List.from(_libraryMap.values); |
| 115 | 97 |
| 116 /** | 98 /** |
| 117 * Return an array containing the library URI's for which a mapping is availab
le. | 99 * Return a list containing the library URI's for which a mapping is available
. |
| 118 * | |
| 119 * @return the library URI's for which a mapping is available | |
| 120 */ | 100 */ |
| 121 List<String> get uris => new List.from(_libraryMap.keys.toSet()); | 101 List<String> get uris => new List.from(_libraryMap.keys.toSet()); |
| 122 | 102 |
| 123 /** | 103 /** |
| 124 * Return the library with the given URI, or `null` if the URI does not map to
a library. | 104 * Return the library with the given 'dart:' [uri], or `null` if the URI does |
| 125 * | 105 * not map to a library. |
| 126 * @param dartUri the URI of the library to be returned | |
| 127 * @return the library with the given URI | |
| 128 */ | 106 */ |
| 129 SdkLibrary getLibrary(String dartUri) => _libraryMap[dartUri]; | 107 SdkLibrary getLibrary(String uri) => _libraryMap[uri]; |
| 130 | 108 |
| 131 /** | 109 /** |
| 132 * Return the library with the given URI, or `null` if the URI does not map to
a library. | 110 * Set the library with the given 'dart:' [uri] to the given [library]. |
| 133 * | |
| 134 * @param dartUri the URI of the library to be returned | |
| 135 * @param library the library with the given URI | |
| 136 */ | 111 */ |
| 137 void setLibrary(String dartUri, SdkLibraryImpl library) { | 112 void setLibrary(String dartUri, SdkLibraryImpl library) { |
| 138 _libraryMap[dartUri] = library; | 113 _libraryMap[dartUri] = library; |
| 139 } | 114 } |
| 140 | 115 |
| 141 /** | 116 /** |
| 142 * Return the number of library URI's for which a mapping is available. | 117 * Return the number of library URI's for which a mapping is available. |
| 143 * | |
| 144 * @return the number of library URI's for which a mapping is available | |
| 145 */ | 118 */ |
| 146 int size() => _libraryMap.length; | 119 int size() => _libraryMap.length; |
| 147 } | 120 } |
| 148 | 121 |
| 149 class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> { | 122 class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> { |
| 150 /** | 123 /** |
| 151 * The prefix added to the name of a library to form the URI used in code to r
eference the | 124 * The prefix added to the name of a library to form the URI used in code to |
| 152 * library. | 125 * reference the library. |
| 153 */ | 126 */ |
| 154 static String _LIBRARY_PREFIX = "dart:"; | 127 static String _LIBRARY_PREFIX = "dart:"; |
| 155 | 128 |
| 156 /** | 129 /** |
| 157 * The name of the optional parameter used to indicate whether the library is
an implementation | 130 * The name of the optional parameter used to indicate whether the library is |
| 158 * library. | 131 * an implementation library. |
| 159 */ | 132 */ |
| 160 static String _IMPLEMENTATION = "implementation"; | 133 static String _IMPLEMENTATION = "implementation"; |
| 161 | 134 |
| 162 /** | 135 /** |
| 163 * The name of the optional parameter used to specify the path used when compi
ling for dart2js. | 136 * The name of the optional parameter used to specify the path used when |
| 137 * compiling for dart2js. |
| 164 */ | 138 */ |
| 165 static String _DART2JS_PATH = "dart2jsPath"; | 139 static String _DART2JS_PATH = "dart2jsPath"; |
| 166 | 140 |
| 167 /** | 141 /** |
| 168 * The name of the optional parameter used to indicate whether the library is
documented. | 142 * The name of the optional parameter used to indicate whether the library is |
| 143 * documented. |
| 169 */ | 144 */ |
| 170 static String _DOCUMENTED = "documented"; | 145 static String _DOCUMENTED = "documented"; |
| 171 | 146 |
| 172 /** | 147 /** |
| 173 * The name of the optional parameter used to specify the category of the libr
ary. | 148 * The name of the optional parameter used to specify the category of the |
| 149 * library. |
| 174 */ | 150 */ |
| 175 static String _CATEGORY = "category"; | 151 static String _CATEGORY = "category"; |
| 176 | 152 |
| 177 /** | 153 /** |
| 178 * The name of the optional parameter used to specify the platforms on which t
he library can be | 154 * The name of the optional parameter used to specify the platforms on which |
| 179 * used. | 155 * the library can be used. |
| 180 */ | 156 */ |
| 181 static String _PLATFORMS = "platforms"; | 157 static String _PLATFORMS = "platforms"; |
| 182 | 158 |
| 183 /** | 159 /** |
| 184 * The value of the [PLATFORMS] parameter used to specify that the library can | 160 * The value of the [PLATFORMS] parameter used to specify that the library can |
| 185 * be used on the VM. | 161 * be used on the VM. |
| 186 */ | 162 */ |
| 187 static String _VM_PLATFORM = "VM_PLATFORM"; | 163 static String _VM_PLATFORM = "VM_PLATFORM"; |
| 188 | 164 |
| 189 /** | 165 /** |
| 190 * A flag indicating whether the dart2js path should be used when it is availa
ble. | 166 * A flag indicating whether the dart2js path should be used when it is |
| 167 * available. |
| 191 */ | 168 */ |
| 192 final bool _useDart2jsPaths; | 169 final bool _useDart2jsPaths; |
| 193 | 170 |
| 194 /** | 171 /** |
| 195 * The library map that is populated by visiting the AST structure parsed from
the contents of | 172 * The library map that is populated by visiting the AST structure parsed from |
| 196 * the libraries file. | 173 * the contents of the libraries file. |
| 197 */ | 174 */ |
| 198 LibraryMap _librariesMap = new LibraryMap(); | 175 LibraryMap _librariesMap = new LibraryMap(); |
| 199 | 176 |
| 200 /** | 177 /** |
| 201 * Initialize a newly created library builder to use the dart2js path if the g
iven value is | 178 * Initialize a newly created library builder to use the dart2js path if |
| 202 * `true`. | 179 * [_useDart2jsPaths] is `true`. |
| 203 * | |
| 204 * @param useDart2jsPaths `true` if the dart2js path should be used when it is
available | |
| 205 */ | 180 */ |
| 206 SdkLibrariesReader_LibraryBuilder(this._useDart2jsPaths); | 181 SdkLibrariesReader_LibraryBuilder(this._useDart2jsPaths); |
| 207 | 182 |
| 208 /** | 183 /** |
| 209 * Return the library map that was populated by visiting the AST structure par
sed from the | 184 * Return the library map that was populated by visiting the AST structure |
| 210 * contents of the libraries file. | 185 * parsed from the contents of the libraries file. |
| 211 * | |
| 212 * @return the library map describing the contents of the SDK | |
| 213 */ | 186 */ |
| 214 LibraryMap get librariesMap => _librariesMap; | 187 LibraryMap get librariesMap => _librariesMap; |
| 215 | 188 |
| 216 @override | 189 @override |
| 217 Object visitMapLiteralEntry(MapLiteralEntry node) { | 190 Object visitMapLiteralEntry(MapLiteralEntry node) { |
| 218 String libraryName = null; | 191 String libraryName = null; |
| 219 Expression key = node.key; | 192 Expression key = node.key; |
| 220 if (key is SimpleStringLiteral) { | 193 if (key is SimpleStringLiteral) { |
| 221 libraryName = "$_LIBRARY_PREFIX${key.value}"; | 194 libraryName = "$_LIBRARY_PREFIX${key.value}"; |
| 222 } | 195 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 return null; | 230 return null; |
| 258 } | 231 } |
| 259 } | 232 } |
| 260 | 233 |
| 261 /** | 234 /** |
| 262 * Represents a single library in the SDK | 235 * Represents a single library in the SDK |
| 263 */ | 236 */ |
| 264 abstract class SdkLibrary { | 237 abstract class SdkLibrary { |
| 265 /** | 238 /** |
| 266 * Return the name of the category containing the library. | 239 * Return the name of the category containing the library. |
| 267 * | |
| 268 * @return the name of the category containing the library | |
| 269 */ | 240 */ |
| 270 String get category; | 241 String get category; |
| 271 | 242 |
| 272 /** | 243 /** |
| 273 * Return `true` if this library can be compiled to JavaScript by dart2js. | 244 * Return `true` if this library can be compiled to JavaScript by dart2js. |
| 274 * | |
| 275 * @return `true` if this library can be compiled to JavaScript by dart2js | |
| 276 */ | 245 */ |
| 277 bool get isDart2JsLibrary; | 246 bool get isDart2JsLibrary; |
| 278 | 247 |
| 279 /** | 248 /** |
| 280 * Return `true` if the library is documented. | 249 * Return `true` if the library is documented. |
| 281 * | |
| 282 * @return `true` if the library is documented | |
| 283 */ | 250 */ |
| 284 bool get isDocumented; | 251 bool get isDocumented; |
| 285 | 252 |
| 286 /** | 253 /** |
| 287 * Return `true` if the library is an implementation library. | 254 * Return `true` if the library is an implementation library. |
| 288 * | |
| 289 * @return `true` if the library is an implementation library | |
| 290 */ | 255 */ |
| 291 bool get isImplementation; | 256 bool get isImplementation; |
| 292 | 257 |
| 293 /** | 258 /** |
| 294 * Return `true` if library is internal can be used only by other SDK librarie
s. | 259 * Return `true` if library is internal can be used only by other SDK librarie
s. |
| 295 * | |
| 296 * @return `true` if library is internal can be used only by other SDK librari
es | |
| 297 */ | 260 */ |
| 298 bool get isInternal; | 261 bool get isInternal; |
| 299 | 262 |
| 300 /** | 263 /** |
| 301 * Return `true` if library can be used for both client and server. | 264 * Return `true` if this library can be used for both client and server. |
| 302 * | |
| 303 * @return `true` if this library can be used for both client and server. | |
| 304 */ | 265 */ |
| 305 bool get isShared; | 266 bool get isShared; |
| 306 | 267 |
| 307 /** | 268 /** |
| 308 * Return `true` if this library can be run on the VM. | 269 * Return `true` if this library can be run on the VM. |
| 309 * | |
| 310 * @return `true` if this library can be run on the VM | |
| 311 */ | 270 */ |
| 312 bool get isVmLibrary; | 271 bool get isVmLibrary; |
| 313 | 272 |
| 314 /** | 273 /** |
| 315 * Return the path to the file defining the library. The path is relative to t
he `lib` | 274 * Return the path to the file defining the library. The path is relative to |
| 316 * directory within the SDK. | 275 * the `lib` directory within the SDK. |
| 317 * | |
| 318 * @return the path to the file defining the library | |
| 319 */ | 276 */ |
| 320 String get path; | 277 String get path; |
| 321 | 278 |
| 322 /** | 279 /** |
| 323 * Return the short name of the library. This is the URI of the library, inclu
ding `dart:`. | 280 * Return the short name of the library. This is the URI of the library, |
| 324 * | 281 * including `dart:`. |
| 325 * @return the short name of the library | |
| 326 */ | 282 */ |
| 327 String get shortName; | 283 String get shortName; |
| 328 } | 284 } |
| 329 | 285 |
| 330 /** | 286 /** |
| 331 * Instances of the class `SdkLibrary` represent the information known about a s
ingle library | 287 * The information known about a single library within the SDK. |
| 332 * within the SDK. | |
| 333 */ | 288 */ |
| 334 class SdkLibraryImpl implements SdkLibrary { | 289 class SdkLibraryImpl implements SdkLibrary { |
| 335 /** | 290 /** |
| 336 * The bit mask used to access the bit representing the flag indicating whethe
r a library is | 291 * The bit mask used to access the bit representing the flag indicating |
| 337 * intended to work on the dart2js platform. | 292 * whether a library is intended to work on the dart2js platform. |
| 338 */ | 293 */ |
| 339 static int DART2JS_PLATFORM = 1; | 294 static int DART2JS_PLATFORM = 1; |
| 340 | 295 |
| 341 /** | 296 /** |
| 342 * The bit mask used to access the bit representing the flag indicating whethe
r a library is | 297 * The bit mask used to access the bit representing the flag indicating |
| 343 * intended to work on the VM platform. | 298 * whether a library is intended to work on the VM platform. |
| 344 */ | 299 */ |
| 345 static int VM_PLATFORM = 2; | 300 static int VM_PLATFORM = 2; |
| 346 | 301 |
| 347 /** | 302 /** |
| 348 * The short name of the library. This is the name used after `dart:` in a URI
. | 303 * The short name of the library. This is the name used after 'dart:' in a |
| 304 * URI. |
| 349 */ | 305 */ |
| 350 String _shortName = null; | 306 String _shortName = null; |
| 351 | 307 |
| 352 /** | 308 /** |
| 353 * The path to the file defining the library. The path is relative to the `lib
` directory | 309 * The path to the file defining the library. The path is relative to the |
| 354 * within the SDK. | 310 * 'lib' directory within the SDK. |
| 355 */ | 311 */ |
| 356 String path = null; | 312 String path = null; |
| 357 | 313 |
| 358 /** | 314 /** |
| 359 * The name of the category containing the library. Unless otherwise specified
in the libraries | 315 * The name of the category containing the library. Unless otherwise specified |
| 360 * file all libraries are assumed to be shared between server and client. | 316 * in the libraries file all libraries are assumed to be shared between server |
| 317 * and client. |
| 361 */ | 318 */ |
| 362 String category = "Shared"; | 319 String category = "Shared"; |
| 363 | 320 |
| 364 /** | 321 /** |
| 365 * A flag indicating whether the library is documented. | 322 * A flag indicating whether the library is documented. |
| 366 */ | 323 */ |
| 367 bool _documented = true; | 324 bool _documented = true; |
| 368 | 325 |
| 369 /** | 326 /** |
| 370 * A flag indicating whether the library is an implementation library. | 327 * A flag indicating whether the library is an implementation library. |
| 371 */ | 328 */ |
| 372 bool _implementation = false; | 329 bool _implementation = false; |
| 373 | 330 |
| 374 /** | 331 /** |
| 375 * An encoding of which platforms this library is intended to work on. | 332 * An encoding of which platforms this library is intended to work on. |
| 376 */ | 333 */ |
| 377 int _platforms = 0; | 334 int _platforms = 0; |
| 378 | 335 |
| 379 /** | 336 /** |
| 380 * Initialize a newly created library to represent the library with the given
name. | 337 * Initialize a newly created library to represent the library with the given |
| 381 * | 338 * [name]. |
| 382 * @param name the short name of the library | |
| 383 */ | 339 */ |
| 384 SdkLibraryImpl(String name) { | 340 SdkLibraryImpl(String name) { |
| 385 this._shortName = name; | 341 this._shortName = name; |
| 386 } | 342 } |
| 387 | 343 |
| 388 /** | 344 /** |
| 389 * Set whether the library is documented to match the given value. | 345 * Set whether the library is documented. |
| 390 * | |
| 391 * @param documented `true` if the library is documented | |
| 392 */ | 346 */ |
| 393 void set documented(bool documented) { | 347 void set documented(bool documented) { |
| 394 this._documented = documented; | 348 this._documented = documented; |
| 395 } | 349 } |
| 396 | 350 |
| 397 /** | 351 /** |
| 398 * Set whether the library is an implementation library to match the given val
ue. | 352 * Set whether the library is an implementation library. |
| 399 * | |
| 400 * @param implementation `true` if the library is an implementation library | |
| 401 */ | 353 */ |
| 402 void set implementation(bool implementation) { | 354 void set implementation(bool implementation) { |
| 403 this._implementation = implementation; | 355 this._implementation = implementation; |
| 404 } | 356 } |
| 405 | 357 |
| 406 @override | 358 @override |
| 407 bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0; | 359 bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0; |
| 408 | 360 |
| 409 @override | 361 @override |
| 410 bool get isDocumented => _documented; | 362 bool get isDocumented => _documented; |
| 411 | 363 |
| 412 @override | 364 @override |
| 413 bool get isImplementation => _implementation; | 365 bool get isImplementation => _implementation; |
| 414 | 366 |
| 415 @override | 367 @override |
| 416 bool get isInternal => "Internal" == category; | 368 bool get isInternal => "Internal" == category; |
| 417 | 369 |
| 418 /** | |
| 419 * Return `true` if library can be used for both client and server | |
| 420 */ | |
| 421 @override | 370 @override |
| 422 bool get isShared => category == "Shared"; | 371 bool get isShared => category == "Shared"; |
| 423 | 372 |
| 424 /** | |
| 425 * Return `true` if this library can be run on the VM. | |
| 426 * | |
| 427 * @return `true` if this library can be run on the VM | |
| 428 */ | |
| 429 @override | 373 @override |
| 430 bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0; | 374 bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0; |
| 431 | 375 |
| 432 @override | 376 @override |
| 433 String get shortName => _shortName; | 377 String get shortName => _shortName; |
| 434 | 378 |
| 435 /** | 379 /** |
| 436 * Record that this library can be compiled to JavaScript by dart2js. | 380 * Record that this library can be compiled to JavaScript by dart2js. |
| 437 */ | 381 */ |
| 438 void setDart2JsLibrary() { | 382 void setDart2JsLibrary() { |
| 439 _platforms |= DART2JS_PLATFORM; | 383 _platforms |= DART2JS_PLATFORM; |
| 440 } | 384 } |
| 441 | 385 |
| 442 /** | 386 /** |
| 443 * Record that this library can be run on the VM. | 387 * Record that this library can be run on the VM. |
| 444 */ | 388 */ |
| 445 void setVmLibrary() { | 389 void setVmLibrary() { |
| 446 _platforms |= VM_PLATFORM; | 390 _platforms |= VM_PLATFORM; |
| 447 } | 391 } |
| 448 } | 392 } |
| OLD | NEW |