| 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 file="$1" | 7 file="$1" |
| 8 while [ -h "$file" ]; do | 8 while [ -h "$file" ]; do |
| 9 # On Mac OS, readlink -f doesn't work. | 9 # On Mac OS, readlink -f doesn't work. |
| 10 file="$(readlink "$file")" | 10 file="$(readlink "$file")" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 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 | 42 if test -f "$SNAPSHOT"; then |
| 43 EXTRA_OPTIONS+=("--library-root=$SDK_DIR") | 43 EXTRA_OPTIONS+=("--library-root=$SDK_DIR") |
| 44 fi | 44 fi |
| 45 | 45 |
| 46 # Tell the VM to grow the heap more aggressively. This should only | |
| 47 # be necessary temporarily until the VM is better at detecting how | |
| 48 # applications use memory. | |
| 49 # TODO(ahe): Remove this option (http://dartbug.com/6495). | |
| 50 EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--heap_growth_rate=512' | |
| 51 | |
| 52 case $0 in | 46 case $0 in |
| 53 *_developer) | 47 *_developer) |
| 54 EXTRA_VM_OPTIONS+=('--checked') | 48 EXTRA_VM_OPTIONS+=('--checked') |
| 55 ;; | 49 ;; |
| 56 esac | 50 esac |
| 57 | 51 |
| 58 # We allow extra vm options to be passed in through an environment variable. | 52 # We allow extra vm options to be passed in through an environment variable. |
| 59 if [[ $DART_VM_OPTIONS ]]; then | 53 if [[ $DART_VM_OPTIONS ]]; then |
| 60 read -a OPTIONS <<< "$DART_VM_OPTIONS" | 54 read -a OPTIONS <<< "$DART_VM_OPTIONS" |
| 61 EXTRA_VM_OPTIONS+=("${OPTIONS[@]}") | 55 EXTRA_VM_OPTIONS+=("${OPTIONS[@]}") |
| 62 fi | 56 fi |
| 63 | 57 |
| 64 exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@" | 58 exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@" |
| OLD | NEW |