OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Command line tool to run the checker on a Dart program. | 5 /// Command line tool to run the checker on a Dart program. |
6 library dev_compiler.src.compiler; | 6 library dev_compiler.src.compiler; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 import 'dart:convert' show JSON; | 10 import 'dart:convert' show JSON; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 'dart.typed_data', | 503 'dart.typed_data', |
504 'dart._native_typed_data', | 504 'dart._native_typed_data', |
505 'dart._isolate_helper', | 505 'dart._isolate_helper', |
506 'dart._js_primitives', | 506 'dart._js_primitives', |
507 'dart.convert', | 507 'dart.convert', |
508 // TODO(jmesserly): these are not part of corelib library cycle, and shouldn't | 508 // TODO(jmesserly): these are not part of corelib library cycle, and shouldn't |
509 // be listed here. Instead, their source should be copied on demand if they | 509 // be listed here. Instead, their source should be copied on demand if they |
510 // are actually used by the application. | 510 // are actually used by the application. |
511 'dart.mirrors', | 511 'dart.mirrors', |
512 'dart._js_mirrors', | 512 'dart._js_mirrors', |
513 'dart.js' | 513 'dart.js', |
| 514 'dart._metadata', |
| 515 'dart.dom.html_common', |
| 516 'dart.dom.html' |
514 // _foreign_helper is not included, as it only defines the JS builtin that | 517 // _foreign_helper is not included, as it only defines the JS builtin that |
515 // the compiler handles at compile time. | 518 // the compiler handles at compile time. |
516 ]; | 519 ]; |
517 | 520 |
518 /// Runtime files added to all applications when running the compiler in the | 521 /// Runtime files added to all applications when running the compiler in the |
519 /// command line. | 522 /// command line. |
520 final defaultRuntimeFiles = () { | 523 final defaultRuntimeFiles = () { |
| 524 String coreToFile(String name) { |
| 525 var parts = name.split('.'); |
| 526 var length = parts.length; |
| 527 if (length > 1) { |
| 528 name = parts[0] + '/' + parts[length - 1]; |
| 529 } |
| 530 return name + '.js'; |
| 531 } |
| 532 |
521 var files = [ | 533 var files = [ |
522 'harmony_feature_check.js', | 534 'harmony_feature_check.js', |
523 'dart_library.js', | 535 'dart_library.js', |
524 'dart/_utils.js', | 536 'dart/_utils.js', |
525 'dart/_errors.js', | 537 'dart/_errors.js', |
526 'dart/_generators.js', | 538 'dart/_generators.js', |
527 'dart/_types.js', | 539 'dart/_types.js', |
528 'dart/_rtti.js', | 540 'dart/_rtti.js', |
529 'dart/_classes.js', | 541 'dart/_classes.js', |
530 'dart/_operations.js', | 542 'dart/_operations.js', |
531 'dart/_runtime.js', | 543 'dart/_runtime.js', |
532 ]; | 544 ]; |
533 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); | 545 files.addAll(corelibOrder.map(coreToFile)); |
534 return files; | 546 return files; |
535 }(); | 547 }(); |
536 | 548 |
537 final _log = new Logger('dev_compiler.src.compiler'); | 549 final _log = new Logger('dev_compiler.src.compiler'); |
OLD | NEW |