more uniform isabelle_scala;
authorwenzelm
Fri, 21 Apr 2017 13:51:43 +0200
changeset 65531 24544e3f183d
parent 65530 09c00a304c00
child 65532 febfd9f78bd4
more uniform isabelle_scala; more uniform ISABELLE_SCALAC_OPTIONS with heap options;
etc/settings
src/HOL/Library/code_test.ML
src/Tools/Code/code_scala.ML
src/Tools/jEdit/lib/Tools/jedit
--- a/etc/settings	Fri Apr 21 11:38:45 2017 +0200
+++ b/etc/settings	Fri Apr 21 13:51:43 2017 +0200
@@ -12,7 +12,7 @@
 ### Isabelle/Scala
 ###
 
-ISABELLE_SCALAC_OPTIONS="-encoding UTF-8 -nowarn -target:jvm-1.8 -Xmax-classfile-name 130"
+ISABELLE_SCALAC_OPTIONS="-encoding UTF-8 -nowarn -target:jvm-1.8 -Xmax-classfile-name 130 -J-Xms128m -J-Xmx1024m -J-Xss2m"
 
 ISABELLE_JAVA_SYSTEM_OPTIONS="-server -Dfile.encoding=UTF-8 -Disabelle.threads=0"
 
--- a/src/HOL/Library/code_test.ML	Fri Apr 21 11:38:45 2017 +0200
+++ b/src/HOL/Library/code_test.ML	Fri Apr 21 13:51:43 2017 +0200
@@ -551,11 +551,11 @@
       "}\n"
 
     val compile_cmd =
-      "\"$SCALA_HOME/bin/scalac\" $ISABELLE_SCALAC_OPTIONS -d " ^ File.bash_path path ^
+      "isabelle_scala scalac $ISABELLE_SCALAC_OPTIONS -d " ^ File.bash_path path ^
       " -classpath " ^ File.bash_path path ^ " " ^
       File.bash_path code_path ^ " " ^ File.bash_path driver_path
 
-    val run_cmd = "\"$SCALA_HOME/bin/scala\" -cp " ^ File.bash_path path ^ " Test"
+    val run_cmd = "isabelle_scala scala -cp " ^ File.bash_path path ^ " Test"
   in
     {files = [(driver_path, driver)],
      compile_cmd = SOME compile_cmd, run_cmd = run_cmd, mk_code_file = K code_path}
--- a/src/Tools/Code/code_scala.ML	Fri Apr 21 11:38:45 2017 +0200
+++ b/src/Tools/Code/code_scala.ML	Fri Apr 21 13:51:43 2017 +0200
@@ -465,7 +465,7 @@
       check = { env_var = "SCALA_HOME",
         make_destination = fn p => Path.append p (Path.explode "ROOT.scala"),
         make_command = fn _ =>
-          "env JAVA_OPTS='-Xms128m -Xmx512m -Xss2m' \"$SCALA_HOME/bin/scalac\" $ISABELLE_SCALAC_OPTIONS ROOT.scala" } })
+          "isabelle_scala scalac $ISABELLE_SCALAC_OPTIONS ROOT.scala" } })
   #> Code_Target.set_printings (Type_Constructor ("fun",
     [(target, SOME (2, fn print_typ => fn fxy => fn [ty1, ty2] =>
       brackify_infix (1, R) fxy (
--- a/src/Tools/jEdit/lib/Tools/jedit	Fri Apr 21 11:38:45 2017 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit	Fri Apr 21 13:51:43 2017 +0200
@@ -350,7 +350,7 @@
       classpath "$JAR"
     done
     export CLASSPATH="$(platform_path "$ISABELLE_CLASSPATH")"
-    exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALAC_OPTIONS -d dist/classes "${SOURCES[@]}"
+    isabelle_scala scalac $ISABELLE_SCALAC_OPTIONS -d dist/classes "${SOURCES[@]}"
   ) || fail "Failed to compile sources"
 
   cd dist/classes