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

Unified Diff: sdk/bin/pub.bat

Issue 500253002: Run async compiler in pub Windows batch files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | sdk/bin/pub_developer.bat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/bin/pub.bat
diff --git a/sdk/bin/pub.bat b/sdk/bin/pub.bat
index 308398a28d33dd973317646b97451fffa65eaee6..c8ce1eefd7dbaa09863fdb929d998b56ab4d88f4 100644
--- a/sdk/bin/pub.bat
+++ b/sdk/bin/pub.bat
@@ -1,8 +1,12 @@
@echo off
-REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+REM Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
REM for details. All rights reserved. Use of this source code is governed by a
REM BSD-style license that can be found in the LICENSE file.
+rem Run pub.dart on the Dart VM. This script is only used when running pub from
+rem within the Dart source repo. The shipped SDK instead uses "pub_sdk.bat",
+rem which is renamed to "pub.bat" when the SDK is built.
+
setlocal
rem Handle the case where dart-sdk/bin has been symlinked to.
set DIR_NAME_WITH_SLASH=%~dp0
@@ -17,12 +21,6 @@ for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
rem Remove trailing backslash if there is one
IF %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
-set PUB=%SDK_DIR%\lib\_internal\pub\bin\pub.dart
-set DART=%BIN_DIR%\dart
-set SNAPSHOT=%BIN_DIR%\snapshots\pub.dart.snapshot
-set BUILD_DIR=%SDK_DIR%\..\build\ReleaseIA32
-set PACKAGES_DIR=%BUILD_DIR%\pub_packages
-set DART_IN_BUILT_SDK=%BUILD_DIR%\dart-sdk\bin\dart
set VM_OPTIONS=
rem Give the VM extra memory for dart2js.
@@ -30,11 +28,20 @@ rem # TODO(rnystrom): Remove when #8355 is fixed.
rem See comments regarding options below in dart2js shell script.
set VM_OPTIONS=%VM_OPTIONS% --old_gen_heap_size=1024
-if exist "%SNAPSHOT%" (
- "%DART%" %VM_OPTIONS% "%SNAPSHOT%" %*
-) else (
- "%DART_IN_BUILT_SDK%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
-)
+rem Use the Dart binary in the built SDK so pub can find the version file next
+rem to it.
+set BUILD_DIR=%SDK_DIR%\..\build\ReleaseIA32
+set PACKAGES_DIR=%BUILD_DIR%\pub_packages
+set DART=%BUILD_DIR%\dart-sdk\bin\dart
+
+rem Compile async/await down to vanilla Dart.
+rem TODO(rnystrom): Remove this when #104 is fixed.
+set ASYNC_COMPILER="%SDK_DIR%"\lib\_internal\pub\bin\async_compile.dart
+"%DART%" --package-root="%PACKAGES_DIR%" "%ASYNC_COMPILER%" "%BUILD_DIR%" --silent
nweiz 2014/08/25 21:44:14 Long line (assuming there's a way to wrap this).
Bob Nystrom 2014/08/25 21:58:48 Done. It uses "^" of all things.
+
+rem Run the async/await compiled pub.
+set PUB="%BUILD_DIR%\pub_async\bin\pub.dart"
+"%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
endlocal
@@ -52,4 +59,4 @@ if not "%current%"=="" call :follow_links "%current%", result
endlocal & set %~2=%result%
goto :eof
-:end
+:end
« no previous file with comments | « no previous file | sdk/bin/pub_developer.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698