summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2006-06-11 17:31:29 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2006-06-11 17:31:29 +0000
commit4ba746e97c36e39310be6ffe769c2b5543914998 (patch)
tree944429b56a125e2549a8f6d85e415c295f01e810
parent046c97346e3affbb1825e7d63b9b0e2aa5210482 (diff)
downloadscala-4ba746e97c36e39310be6ffe769c2b5543914998.tar.gz
scala-4ba746e97c36e39310be6ffe769c2b5543914998.tar.bz2
scala-4ba746e97c36e39310be6ffe769c2b5543914998.zip
All "scala*" scripts put the Scala library in t...
All "scala*" scripts put the Scala library in the boot class loader (appended to the standard Java boot library). Extension libraries are still loaded by the user class loader.
-rw-r--r--src/compiler/scala/tools/ant/templates/generic-unix.tmpl7
-rw-r--r--src/compiler/scala/tools/ant/templates/generic-windows.tmpl5
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-unix.tmpl8
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl7
4 files changed, 11 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/ant/templates/generic-unix.tmpl b/src/compiler/scala/tools/ant/templates/generic-unix.tmpl
index f5ff31bad2..815ba4568e 100644
--- a/src/compiler/scala/tools/ant/templates/generic-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/generic-unix.tmpl
@@ -90,8 +90,8 @@ if [ "$BOOT_CLASSPATH" = "" ] ; then
fi
fi
-# The merge of all three previous classpaths. All Scala code must currently be in a single class loader.
-MERGED_CLASSPATH="$BOOT_CLASSPATH:$USER_CLASSPATH:$EXTENSION_CLASSPATH"
+# The merge of all non-boot classpaths.
+MERGED_CLASSPATH="$USER_CLASSPATH:$EXTENSION_CLASSPATH"
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
@@ -101,6 +101,7 @@ if $cygwin; then
fi
SCALA_HOME=`cygpath --$format "$SCALA_HOME"`
MERGED_CLASSPATH=`cygpath --path --$format "$MERGED_CLASSPATH"`
+ BOOT_CLASSPATH=`cygpath --path --$format "$BOOT_CLASSPATH"`
fi
-${JAVACMD:=java} @javaflags@ -cp "$MERGED_CLASSPATH" -Dscala.home="$SCALA_HOME" @properties@ $USER_ARGS
+${JAVACMD:=java} @javaflags@ -Xbootclasspath/a:"$BOOT_CLASSPATH" -cp "$MERGED_CLASSPATH" -Dscala.home="$SCALA_HOME" @properties@ $USER_ARGS
diff --git a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl
index 46b42d3e78..f7e828ec2f 100644
--- a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl
@@ -63,13 +63,12 @@ goto :loop
:exec
if not "%_EXTENSION_CLASSPATH%"=="" set _MYCLASSPATH=%_USER_CLASSPATH%;%_EXTENSION_CLASSPATH%
-if not "%_BOOT_CLASSPATH%"=="" set _MYCLASSPATH=%_BOOT_CLASSPATH%;%_MYCLASSPATH%
rem Variable _USER_CLASSPATH is set to CLASSPATH, %1 or . and DO NOT need to be quoted
set _PROPS=-Dscala.home="%_SCALA_HOME%" @properties@
-rem echo %_JAVACMD% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
-%_JAVACMD% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
+rem echo %_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
+%_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
goto end
:version
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index 1bf7259ddd..1f879cb28a 100644
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -54,9 +54,6 @@ if [ "$BOOT_CLASSPATH" = "" ] ; then
fi
fi
-# The merge of the two previous classpaths. All Scala code must currently be in a single class loader.
-MERGED_CLASSPATH="$BOOT_CLASSPATH:$EXTENSION_CLASSPATH"
-
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
@@ -64,7 +61,8 @@ if $cygwin; then
format=windows
fi
SCALA_HOME=`cygpath --$format "$SCALA_HOME"`
- MERGED_CLASSPATH=`cygpath --path --$format "$MERGED_CLASSPATH"`
+ EXTENSION_CLASSPATH=`cygpath --path --$format "$EXTENSION_CLASSPATH"`
+ BOOT_CLASSPATH=`cygpath --path --$format "$BOOT_CLASSPATH"`
fi
-${JAVACMD:=java} @javaflags@ -cp "$MERGED_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ @class@ @toolflags@ "$@@"
+${JAVACMD:=java} @javaflags@ -Xbootclasspath/a:"$BOOT_CLASSPATH" -cp "$EXTENSION_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ @class@ @toolflags@ "$@@"
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
index 198e764e05..b9b8682efb 100644
--- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
@@ -39,9 +39,6 @@ if "%_BOOT_CLASSPATH%"=="" (
)
)
-set _MYCLASSPATH=%_EXTENSION_CLASSPATH%
-if not "%_BOOT_CLASSPATH%"=="" set _MYCLASSPATH=%_BOOT_CLASSPATH%;%_MYCLASSPATH%
-
set _ARGS=
:loop
rem Argument %1 may contain quotes so we use parentheses here
@@ -53,8 +50,8 @@ goto loop
:exec
set _PROPS=-Dscala.home="%_SCALA_HOME%" -Denv.classpath="%CLASSPATH%" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@
-rem echo %_JAVACMD% @javaflags@ %_PROPS% -cp "%_MYCLASSPATH%" @class@ @toolflags@ %_ARGS%
-%_JAVACMD% @javaflags@ %_PROPS% -cp "%_MYCLASSPATH%" @class@ @toolflags@ %_ARGS%
+rem echo %_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp "%_EXTENSION_CLASSPATH%" @class@ @toolflags@ %_ARGS%
+%_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp "%_EXTENSION_CLASSPATH%" @class@ @toolflags@ %_ARGS%
goto end
:version