forked from graalvm/simplelanguage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsl
More file actions
executable file
·25 lines (21 loc) · 959 Bytes
/
sl
File metadata and controls
executable file
·25 lines (21 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
JAVACMD=${JAVACMD:=./graalvm/bin/java}
PROGRAM_ARGS=""
JAVA_ARGS=""
for opt in "$@"
do
case $opt in
-debug)
JAVA_ARGS="$JAVA_ARGS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y" ;;
-dump)
JAVA_ARGS="$JAVA_ARGS -Dgraal.Dump= -Dgraal.MethodFilter=Truffle.* -Dgraal.TruffleBackgroundCompilation=false -Dgraal.TraceTruffleCompilation=true -Dgraal.TraceTruffleCompilationDetails=true" ;;
-disassemble)
JAVA_ARGS="$JAVA_ARGS -XX:CompileCommand=print,*OptimizedCallTarget.callRoot -XX:CompileCommand=exclude,*OptimizedCallTarget.callRoot -Dgraal.TruffleBackgroundCompilation=false -Dgraal.TraceTruffleCompilation=true -Dgraal.TraceTruffleCompilationDetails=true" ;;
-J*)
opt=${opt:2}
JAVA_ARGS="$JAVA_ARGS $opt" ;;
*)
PROGRAM_ARGS="$PROGRAM_ARGS $opt" ;;
esac
done
$JAVACMD $JAVA_ARGS -polyglot -cp ./target/classes com.oracle.truffle.sl.SLMain $PROGRAM_ARGS