mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
dart2js has its own snapshot.
R=ngeoffray@google.com Review URL: https://codereview.chromium.org//19795006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25344 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
5a93e71ed6
commit
216289bcb1
1
dart.gyp
1
dart.gyp
|
@ -68,6 +68,7 @@
|
|||
'<!@(["python", "tools/list_files.py", "", "sdk/bin"])',
|
||||
'tools/create_sdk.py',
|
||||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/dart2js.dart.snapshot',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/utils_wrapper.dart.snapshot',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/pub.dart.snapshot',
|
||||
'<(PRODUCT_DIR)/analyzer/bin/dart_analyzer',
|
||||
|
|
|
@ -24,7 +24,7 @@ DART2JS="$SDK_DIR/lib/_internal/compiler/implementation/dart2js.dart"
|
|||
DART="$BIN_DIR/dart"
|
||||
|
||||
SNAPSHOT_DIR="$BIN_DIR/snapshots"
|
||||
SNAPSHOT="$SNAPSHOT_DIR/utils_wrapper.dart.snapshot"
|
||||
SNAPSHOT="$SNAPSHOT_DIR/dart2js.dart.snapshot"
|
||||
|
||||
unset EXTRA_OPTIONS
|
||||
declare -a EXTRA_OPTIONS
|
||||
|
@ -57,8 +57,7 @@ case $0 in
|
|||
esac
|
||||
|
||||
if test -f "$SNAPSHOT"; then
|
||||
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "dart2js" \
|
||||
"${EXTRA_OPTIONS[@]}" "$@"
|
||||
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@"
|
||||
else
|
||||
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@"
|
||||
fi
|
||||
|
|
|
@ -19,7 +19,7 @@ IF %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
|
|||
|
||||
set DART2JS=%SDK_DIR%\lib\_internal\compiler\implementation\dart2js.dart
|
||||
set DART=%BIN_DIR%\dart
|
||||
set SNAPSHOT=%BIN_DIR%\snapshots\utils_wrapper.dart.snapshot
|
||||
set SNAPSHOT=%BIN_DIR%\snapshots\dart2js.dart.snapshot
|
||||
|
||||
set EXTRA_OPTIONS=
|
||||
set EXTRA_VM_OPTIONS=
|
||||
|
@ -36,7 +36,7 @@ rem See comments regarding options below in dart2js shell script.
|
|||
set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512
|
||||
|
||||
if exist "%SNAPSHOT%" (
|
||||
"%DART%" %EXTRA_VM_OPTIONS% "%SNAPSHOT%" "dart2js" %EXTRA_OPTIONS% %*
|
||||
"%DART%" %EXTRA_VM_OPTIONS% "%SNAPSHOT%" %EXTRA_OPTIONS% %*
|
||||
) else (
|
||||
"%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %*
|
||||
)
|
||||
|
|
|
@ -113,7 +113,7 @@ def CopyDartScripts(home, sdk_root):
|
|||
|
||||
|
||||
def CopySnapshots(snapshots, sdk_root):
|
||||
for snapshot in ['utils_wrapper', 'pub']:
|
||||
for snapshot in ['dart2js', 'utils_wrapper', 'pub']:
|
||||
snapshot += '.dart.snapshot'
|
||||
copyfile(join(snapshots, snapshot),
|
||||
join(sdk_root, 'bin', 'snapshots', snapshot))
|
||||
|
|
|
@ -17,6 +17,29 @@
|
|||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_dart2js_snapshot',
|
||||
'inputs': [
|
||||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
|
||||
'../../sdk/lib/_internal/libraries.dart',
|
||||
'<!@(["python", "../../tools/list_files.py", "\\.dart$",'
|
||||
' "../../sdk/lib/_internal/compiler", "../../runtime/lib"])',
|
||||
'../../sdk/lib/_internal/libraries.dart',
|
||||
],
|
||||
'outputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/dart2js.dart.snapshot',
|
||||
],
|
||||
'action': [
|
||||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
|
||||
# Note: we don't store the snapshot in the location where
|
||||
# the dart2js script is looking for it. The motivation
|
||||
# for that is to support an incremental development model
|
||||
# for dart2js compiler engineers. However, we install the
|
||||
# snapshot in the proper location when building the SDK.
|
||||
'--snapshot=<(SHARED_INTERMEDIATE_DIR)/dart2js.dart.snapshot',
|
||||
'../../sdk/lib/_internal/compiler/implementation/dart2js.dart',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'generate_dartdoc_snapshot',
|
||||
'inputs': [
|
||||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
|
||||
'../../sdk/lib/_internal/libraries.dart',
|
||||
|
|
Loading…
Reference in a new issue