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

Side by Side Diff: sdk/bin/dart2js.bat

Issue 12088067: Second attempt to fix dart2js.bat so it looks for dart2js snapshot in right place. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/bin/dart2js_developer.bat » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @echo off 1 @echo off
2 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 REM for details. All rights reserved. Use of this source code is governed by a 3 REM for details. All rights reserved. Use of this source code is governed by a
4 REM BSD-style license that can be found in the LICENSE file. 4 REM BSD-style license that can be found in the LICENSE file.
5 5
6 set SCRIPTPATH=%~dp0 6 setlocal
7 rem Handle the case where dart-sdk/bin has been symlinked to.
8 set DIR_NAME_WITH_SLASH=%~dp0
9 set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
10 call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
11 rem Get rid of surrounding quotes.
12 for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
7 13
8 REM Does the path have a trailing slash? If so, remove it. 14 rem Get absolute full name for SDK_DIR.
9 if %SCRIPTPATH:~-1%== set SCRIPTPATH=%SCRIPTPATH:~0,-1% 15 for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
10 16
11 set arguments=%* 17 set DART2JS=%SDK_DIR%lib\_internal\compiler\implementation\dart2js.dart
12 set SNAPSHOTNAME="%SCRIPTPATH%dart2js.snapshot" 18 set DART=%BIN_DIR%\dart
13 if exist %SNAPSHOTNAME% set SNAPSHOT=--use-script-snapshot=%SNAPSHOTNAME% 19 set SNAPSHOT=%DART2JS%.snapshot
14 20
15 "%SCRIPTPATH%dart" --heap_growth_rate=512 %SNAPSHOT% "%SCRIPTPATH%..\lib\_intern al\compiler\implementation\dart2js.dart" %arguments% 21 set EXTRA_OPTIONS=
22 set EXTRA_VM_OPTIONS=
23
24 if _%DART2JS_DEVELOPER_MODE%_ == _1_ (
25 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --checked
26 )
27
28 if exist "%SNAPSHOT%" (
29 echo Using snapshot "%SNAPSHOT%" >&2
30 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --use-script-snapshot="%SNAPSHOT%"
31 )
32
33 rem See comments regarding options below in dart2js shell script.
34 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512
35 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --no_use_inlining
kasperl 2013/03/18 10:46:59 This seems outdated.
aam-me 2013/03/18 11:31:52 Done. Thanks!
36
37 "%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %*
38 endlocal
39
40 exit /b %errorlevel%
41
42 :follow_links
43 setlocal
44 for %%i in (%1) do set result=%%~fi
45 set current=
46 for /f "tokens=2 delims=[]" %%i in ('dir /a:l ^"%~dp1^" 2^>nul ^
47 ^| find "> %~n1 ["') do (
48 set current=%%i
49 )
50 if not "%current%"=="" call :follow_links "%current%", result
51 endlocal & set %~2=%result%
52 goto :eof
53
54 :end
OLDNEW
« no previous file with comments | « no previous file | sdk/bin/dart2js_developer.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698