Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(992)

Side by Side Diff: lib/src/compiler.dart

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: regen sdk and expectations Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 'dart._isolate_helper', 506 'dart._isolate_helper',
507 'dart._js_primitives', 507 'dart._js_primitives',
508 'dart.convert', 508 'dart.convert',
509 // TODO(jmesserly): these are not part of corelib library cycle, and shouldn't 509 // TODO(jmesserly): these are not part of corelib library cycle, and shouldn't
510 // be listed here. Instead, their source should be copied on demand if they 510 // be listed here. Instead, their source should be copied on demand if they
511 // are actually used by the application. 511 // are actually used by the application.
512 'dart.mirrors', 512 'dart.mirrors',
513 'dart._js_mirrors', 513 'dart._js_mirrors',
514 'dart.js', 514 'dart.js',
515 'dart._metadata', 515 'dart._metadata',
516 'dart.dom.html_common', 516 'dart.html_common',
517 'dart.dom.html', 517 'dart.html',
vsm 2016/01/26 14:09:40 These need to match the library names in html_ddc.
ochafik 2016/01/26 16:27:36 Done: added special casing for their module name (
518 'dart._debugger' 518 'dart._debugger'
519 // _foreign_helper is not included, as it only defines the JS builtin that 519 // _foreign_helper is not included, as it only defines the JS builtin that
520 // the compiler handles at compile time. 520 // the compiler handles at compile time.
521 ]; 521 ];
522 final corelibUriOrder =
523 corelibOrder.map((lib) => lib.replaceAll('dart.', 'dart:')).toList();
522 524
523 /// Runtime files added to all applications when running the compiler in the 525 /// Runtime files added to all applications when running the compiler in the
524 /// command line. 526 /// command line.
525 final defaultRuntimeFiles = () { 527 final defaultRuntimeFiles = () {
526 String coreToFile(String name) { 528 String coreToFile(String name) {
527 var parts = name.split('.'); 529 var parts = name.split('.');
528 var length = parts.length; 530 var length = parts.length;
529 if (length > 1) { 531 if (length > 1) {
530 name = parts[0] + '/' + parts[length - 1]; 532 name = parts[0] + '/' + parts[length - 1];
531 } 533 }
532 return name + '.js'; 534 return name + '.js';
533 } 535 }
534 536
535 var files = [ 537 var files = [
536 'harmony_feature_check.js', 538 'harmony_feature_check.js',
537 'dart_library.js', 539 'dart_library.js',
538 'dart/_runtime.js', 540 'dart/_runtime.js',
539 ]; 541 ];
540 files.addAll(corelibOrder.map(coreToFile)); 542 files.addAll(corelibOrder.map(coreToFile));
541 return files; 543 return files;
542 }(); 544 }();
543 545
544 final _log = new Logger('dev_compiler.src.compiler'); 546 final _log = new Logger('dev_compiler.src.compiler');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698