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

Unified Diff: dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py

Issue 9332008: Use production mode when running on debug VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reenable slow tests Created 8 years, 10 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
« no previous file with comments | « no previous file | dart/frog/scripts/bootstrap/frog_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
diff --git a/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py b/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
index f61d8b5e0d0aeaec164dbcb9df68a54d36e23db3..5510b688deff478bd257f309567e61f1be0b9325 100644
--- a/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
+++ b/dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py
@@ -11,6 +11,7 @@ HOME = os.path.join(HOME, os.pardir, os.pardir)
END_SCRIPT = '''
VM = '%s'
+VM_FLAGS = '%s'
if __name__ == '__main__':
sys.exit(main(sys.argv))
'''
@@ -23,13 +24,16 @@ def main(args):
vm = vm + '.exe'
frog = os.path.join(product_dir, 'frog', 'bin', 'frog')
- # TODO(ngeoffray): Create a script that will run the VM in production mode.
- # if js_out.find('Release') != -1:
shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'),
frog)
+ if 'Release' in product_dir:
kasperl 2012/02/07 09:07:55 Maybe add a comment here that explains why we run
ahe 2012/02/07 09:14:29 Done.
+ vm_flags = '--vm_flags=--enable_asserts --enable_type_checks'
+ else:
+ vm_flags = ''
+
with open(frog, 'a+') as f:
- f.write(END_SCRIPT % vm)
+ f.write(END_SCRIPT % (vm, vm_flags))
os.chmod(frog, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
stat.S_IRGRP | stat.S_IWUSR)
« no previous file with comments | « no previous file | dart/frog/scripts/bootstrap/frog_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698