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

Unified 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: reverted let->const parasite change 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 side-by-side diff with in-line comments
Download patch
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index 61c568591624e3a99238c4a54937cf2f6f85bcf8..0699a0b24d01d152c2d3848e08ef2c955445c0ba 100644
--- a/lib/src/compiler.dart
+++ b/lib/src/compiler.dart
@@ -513,13 +513,25 @@ const corelibOrder = const [
'dart._js_mirrors',
'dart.js',
'dart._metadata',
- 'dart.dom.html_common',
'dart.dom.html',
+ 'dart.dom.html_common',
'dart._debugger'
// _foreign_helper is not included, as it only defines the JS builtin that
// the compiler handles at compile time.
];
+String getCorelibModuleName(String lib) {
Jennifer Messerly 2016/01/29 00:32:32 doc comment? :) https://www.dartlang.org/effective
ochafik 2016/01/29 09:38:17 Done.
+ switch (lib) {
+ case 'dart.dom.html_common':
+ return 'dart/html_common';
+ case 'dart.dom.html':
+ return 'dart/html';
+ default:
+ assert(lib.startsWith('dart.'));
Jennifer Messerly 2016/01/29 00:32:32 this assert could be moved up top?
ochafik 2016/01/29 09:38:17 Done (+ turned into `assert(corelibOrder.contains(
+ return lib.replaceAll('dart.', 'dart/');
+ }
+}
+
/// Runtime files added to all applications when running the compiler in the
/// command line.
final defaultRuntimeFiles = () {

Powered by Google App Engine
This is Rietveld 408576698