OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 function follow_links() { | 6 function follow_links() { |
7 while [ -h "$1" ]; do | 7 while [ -h "$1" ]; do |
8 # On Mac OS, readlink -f doesn't work. | 8 # On Mac OS, readlink -f doesn't work. |
9 1="$(readlink "$1")" | 9 1="$(readlink "$1")" |
10 done | 10 done |
(...skipping 21 matching lines...) Expand all Loading... | |
32 # Stdout is a terminal. | 32 # Stdout is a terminal. |
33 if test 8 -le `tput colors`; then | 33 if test 8 -le `tput colors`; then |
34 # Stdout has at least 8 colors, so enable colors. | 34 # Stdout has at least 8 colors, so enable colors. |
35 EXTRA_OPTIONS[${#EXTRA_OPTIONS[@]}]='--enable-diagnostic-colors' | 35 EXTRA_OPTIONS[${#EXTRA_OPTIONS[@]}]='--enable-diagnostic-colors' |
36 fi | 36 fi |
37 fi | 37 fi |
38 | 38 |
39 unset EXTRA_VM_OPTIONS | 39 unset EXTRA_VM_OPTIONS |
40 declare -a EXTRA_VM_OPTIONS | 40 declare -a EXTRA_VM_OPTIONS |
41 | 41 |
42 if test -f "$SNAPSHOT"; then | |
43 # TODO(ahe): Remove the following line when we are relatively sure it works. | |
44 echo Using snapshot "$SNAPSHOT" 1>&2 | |
ahe
2013/03/20 06:59:28
Could you retain this for now?
siva
2013/03/20 20:57:20
Done.
| |
45 EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]="--use-script-snapshot=$SNAPSHOT" | |
46 fi | |
47 | |
48 # Tell the VM to grow the heap more aggressively. This should only | 42 # Tell the VM to grow the heap more aggressively. This should only |
49 # be necessary temporarily until the VM is better at detecting how | 43 # be necessary temporarily until the VM is better at detecting how |
50 # applications use memory. | 44 # applications use memory. |
51 # TODO(ahe): Remove this option (http://dartbug.com/6495). | 45 # TODO(ahe): Remove this option (http://dartbug.com/6495). |
52 EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--heap_growth_rate=512' | 46 EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--heap_growth_rate=512' |
53 | 47 |
54 case $0 in | 48 case $0 in |
55 *_developer) | 49 *_developer) |
56 EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--checked' | 50 EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--checked' |
57 ;; | 51 ;; |
58 esac | 52 esac |
59 | 53 |
60 exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@" | 54 if test -f "$SNAPSHOT"; then |
55 exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@" | |
56 else | |
57 exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@" | |
58 fi | |
OLD | NEW |