OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 /** | 7 /** |
8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
9 * compiled. | 9 * compiled. |
10 */ | 10 */ |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 * Is the compiler in verbose mode. | 279 * Is the compiler in verbose mode. |
280 */ | 280 */ |
281 final bool verbose; | 281 final bool verbose; |
282 | 282 |
283 /** | 283 /** |
284 * URI of the main source map if the compiler is generating source | 284 * URI of the main source map if the compiler is generating source |
285 * maps. | 285 * maps. |
286 */ | 286 */ |
287 final Uri sourceMapUri; | 287 final Uri sourceMapUri; |
288 | 288 |
| 289 /** |
| 290 * The name to use for the global JS object in JS output. Default |
| 291 * value is "$". |
| 292 */ |
| 293 final String globalJsName; |
| 294 |
289 final api.CompilerOutputProvider outputProvider; | 295 final api.CompilerOutputProvider outputProvider; |
290 | 296 |
291 bool disableInlining = false; | 297 bool disableInlining = false; |
292 | 298 |
293 List<Uri> librariesToAnalyzeWhenRun; | 299 List<Uri> librariesToAnalyzeWhenRun; |
294 | 300 |
295 final Tracer tracer; | 301 final Tracer tracer; |
296 | 302 |
297 CompilerTask measuredTask; | 303 CompilerTask measuredTask; |
298 Element _currentElement; | 304 Element _currentElement; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 bool disallowUnsafeEval: false, | 459 bool disallowUnsafeEval: false, |
454 this.analyzeAll: false, | 460 this.analyzeAll: false, |
455 bool analyzeOnly: false, | 461 bool analyzeOnly: false, |
456 bool analyzeSignaturesOnly: false, | 462 bool analyzeSignaturesOnly: false, |
457 this.rejectDeprecatedFeatures: false, | 463 this.rejectDeprecatedFeatures: false, |
458 this.checkDeprecationInSdk: false, | 464 this.checkDeprecationInSdk: false, |
459 this.preserveComments: false, | 465 this.preserveComments: false, |
460 this.verbose: false, | 466 this.verbose: false, |
461 this.sourceMapUri: null, | 467 this.sourceMapUri: null, |
462 this.buildId: "build number could not be determined", | 468 this.buildId: "build number could not be determined", |
| 469 this.globalJsName: r'$', |
463 outputProvider, | 470 outputProvider, |
464 List<String> strips: const []}) | 471 List<String> strips: const []}) |
465 : this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly, | 472 : this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly, |
466 this.analyzeSignaturesOnly = analyzeSignaturesOnly, | 473 this.analyzeSignaturesOnly = analyzeSignaturesOnly, |
467 this.outputProvider = | 474 this.outputProvider = |
468 (outputProvider == null) ? NullSink.outputProvider : outputProvider | 475 (outputProvider == null) ? NullSink.outputProvider : outputProvider |
469 | 476 |
470 { | 477 { |
471 world = new World(this); | 478 world = new World(this); |
472 | 479 |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 | 1339 |
1333 void close() {} | 1340 void close() {} |
1334 | 1341 |
1335 toString() => name; | 1342 toString() => name; |
1336 | 1343 |
1337 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1344 /// Convenience method for getting an [api.CompilerOutputProvider]. |
1338 static NullSink outputProvider(String name, String extension) { | 1345 static NullSink outputProvider(String name, String extension) { |
1339 return new NullSink('$name.$extension'); | 1346 return new NullSink('$name.$extension'); |
1340 } | 1347 } |
1341 } | 1348 } |
OLD | NEW |