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

Unified Diff: sdk/bin/dartanalyzer.bat

Issue 628363002: Modify dartanalyzer scripts to look more like dart2js scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move code inside else clause Created 6 years, 2 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: sdk/bin/dartanalyzer.bat
diff --git a/sdk/bin/dartanalyzer.bat b/sdk/bin/dartanalyzer.bat
index bca4afbf4474a23a3fbb47a8e58f33533a6911c4..58691e816cfb7f2c067d3422dbaa277e6b3b176b 100644
--- a/sdk/bin/dartanalyzer.bat
+++ b/sdk/bin/dartanalyzer.bat
@@ -11,9 +11,6 @@ call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
rem Get rid of surrounding quotes.
for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
-set DART=%BIN_DIR%\dart
-set SNAPSHOT=%BIN_DIR%\snapshots\dartanalyzer.dart.snapshot
-
rem Get absolute full name for SDK_DIR.
for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
@@ -22,7 +19,44 @@ if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
set SDK_ARG=--dart-sdk=%SDK_DIR%
-"%DART%" "%SNAPSHOT%" "%SDK_ARG%" %*
+set DART=%BIN_DIR%\dart
+set SNAPSHOT=%BIN_DIR%\snapshots\dartanalyzer.dart.snapshot
+set BUILD_DIR=%DART_ROOT%\build\%DART_CONFIGURATION%
+
+set EXTRA_VM_OPTIONS=
+
+if _%DARTANALYZER_DEVELOPER_MODE%_ == _1_ (
+ set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --checked
+)
+
+rem See comments regarding options below in dartanalyzer shell script.
+set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512
+set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --inlining_hotness=90
+set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --optimization_counter_threshold=5000
+
+rem We allow extra vm options to be passed in through an environment variable.
+if not "_%DART_VM_OPTIONS%_" == "__" (
+ set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% %DART_VM_OPTIONS%
+)
+
+if exist "%SNAPSHOT%" (
+ "%DART%" %EXTRA_VM_OPTIONS% "%SNAPSHOT%" "%SDK_ARG%" %*
+) else (
+ rem Get absolute full name for DART_ROOT.
+ for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi
+
+ rem Remove trailing backslash if there is one
+ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
+
+ set ANALYZER=%DART_ROOT%\pkg\analyzer\bin\analyzer.dart
+
+ REM DART_CONFIGURATION defaults to ReleaseIA32
+ if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseIA32
+
+ set PACKAGE_ROOT=%BUILD_DIR%\packages\
+
+ "%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%ANALYZER%" "%SDK_ARG%" %*
+)
endlocal

Powered by Google App Engine
This is Rietveld 408576698