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

Unified Diff: tools/create_sdk.py

Issue 8839002: Create lib/core/core_compiler.dart and lib/coreimpl/coreimpl_compiler.dart . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/create_sdk.py
===================================================================
--- tools/create_sdk.py (revision 2160)
+++ tools/create_sdk.py (working copy)
@@ -267,9 +267,10 @@
# Next, copy the compiler sources on top of {core,coreimpl}/compiler
for filename in corelib_compiler_sources:
- if (filename.endswith(".dart")):
- filename = re.sub("lib/","", filename)
- if not filename.startswith("implementation/"):
+ if filename.endswith('.dart'):
+ filename = re.sub('lib/','', filename)
+ if (not filename.startswith('implementation/') and
+ not filename.startswith('corelib')):
copyfile(join('compiler', 'lib', filename),
join(corelib_dest_dir, 'compiler', filename))
@@ -308,7 +309,13 @@
dest_file.write('#source("runtime/' + filename + '");\n')
dest_file.close()
- # TODO(dgrove) - create lib/core/core_compiler.dart .
+ # construct lib/core_compiler.dart from whole cloth.
+ dest_file = open(join(corelib_dest_dir, 'core_compiler.dart'), 'w')
+ dest_file.write('#library("dart:core");\n')
+ dest_file.write('#import("dart:coreimpl");\n')
+ for filename in os.listdir(join(corelib_dest_dir, 'compiler')):
+ dest_file.write('#import("compiler/' + filename + '");\n')
+ dest_file.close()
#
# Create and populate lib/coreimpl.
@@ -358,7 +365,12 @@
dest_file.write('#source("runtime/' + filename + '");\n')
dest_file.close()
- # TODO(dgrove) - create lib/coreimpl/coreimpl_compiler.dart .
+ # construct lib/coreimpl_compiler.dart from whole cloth.
+ dest_file = open(join(coreimpl_dest_dir, 'coreimpl_compiler.dart'), 'w')
+ dest_file.write('#library("dart:coreimpl");\n')
+ for filename in os.listdir(join(coreimpl_dest_dir, 'compiler')):
+ dest_file.write('#import("compiler/' + filename + '");\n')
+ dest_file.close()
# Create and copy tools.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698