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

Side by Side Diff: utils/compiler/build_helper.dart

Issue 11265020: Minifying renamer for classes, methods and instance variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #import('dart:io'); 5 #import('dart:io');
6 #import('dart:uri'); 6 #import('dart:uri');
7 7
8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); 8 #import('../../lib/compiler/implementation/util/uri_extras.dart');
9 #import('../../lib/compiler/implementation/filenames.dart'); 9 #import('../../lib/compiler/implementation/filenames.dart');
10 10
(...skipping 11 matching lines...) Expand all
22 Uri productUri = cwd.resolve(productDir); 22 Uri productUri = cwd.resolve(productDir);
23 23
24 Uri dartVmUri = productUri.resolve(dartVmPath); 24 Uri dartVmUri = productUri.resolve(dartVmPath);
25 Uri productionUri = productUri.resolve(arguments[2]); 25 Uri productionUri = productUri.resolve(arguments[2]);
26 Uri developerUri = productUri.resolve(arguments[3]); 26 Uri developerUri = productUri.resolve(arguments[3]);
27 Uri dartdocUri = productUri.resolve(arguments[4]); 27 Uri dartdocUri = productUri.resolve(arguments[4]);
28 28
29 List<String> productionScript = buildScript( 29 List<String> productionScript = buildScript(
30 'dart2js-production', 30 'dart2js-production',
31 dartUri, dartVmUri, 31 dartUri, dartVmUri,
32 'lib/compiler/implementation/dart2js.dart', ''); 32 'lib/compiler/implementation/dart2js.dart',
33 '');
33 writeScript(productionUri, productionScript); 34 writeScript(productionUri, productionScript);
34 35
35 List<String> developerScript = buildScript( 36 List<String> developerScript = buildScript(
36 'dart2js-developer', 37 'dart2js-developer',
37 dartUri, dartVmUri, 38 dartUri, dartVmUri,
38 'lib/compiler/implementation/dart2js.dart', ' --enable_checked_mode'); 39 'lib/compiler/implementation/dart2js.dart',
40 r' ${DART_VM_FLAGS:---enable_checked_mode}');
39 writeScript(developerUri, developerScript); 41 writeScript(developerUri, developerScript);
40 42
41 List<String> dartdocScript = buildScript( 43 List<String> dartdocScript = buildScript(
42 'dartdoc', 44 'dartdoc',
43 dartUri, dartVmUri, 45 dartUri, dartVmUri,
44 'pkg/dartdoc/bin/dartdoc.dart', ''); 46 'pkg/dartdoc/bin/dartdoc.dart',
47 '');
45 writeScript(dartdocUri, dartdocScript); 48 writeScript(dartdocUri, dartdocScript);
46 } 49 }
47 50
48 writeScript(Uri uri, List<String> scripts) { 51 writeScript(Uri uri, List<String> scripts) {
49 String unixScript = scripts[0]; 52 String unixScript = scripts[0];
50 String batFile = scripts[1]; 53 String batFile = scripts[1];
51 var f = new File(uriPathToNative(uri.path)); 54 var f = new File(uriPathToNative(uri.path));
52 var stream = f.openSync(FileMode.WRITE); 55 var stream = f.openSync(FileMode.WRITE);
53 try { 56 try {
54 stream.writeStringSync(unixScript); 57 stream.writeStringSync(unixScript);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 set SCRIPTPATH=%~dp0 137 set SCRIPTPATH=%~dp0
135 138
136 REM Does the path have a trailing slash? If so, remove it. 139 REM Does the path have a trailing slash? If so, remove it.
137 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% 140 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
138 141
139 set arguments=%* 142 set arguments=%*
140 143
141 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% 144 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments%
142 '''.replaceAll('\n', '\r\n')]; 145 '''.replaceAll('\n', '\r\n')];
143 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698