summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-03-10 17:17:58 -0700
committerPaul Phillips <paulp@improving.org>2013-03-11 20:07:24 -0700
commit48cc8b47fcadaa187026ca0422178c9094e4b412 (patch)
tree32f3cce4559030e3088741390024c19eb5110bbe /build.xml
parent1b6297f642877dcc7edcd704a5d3cf99a12e54b8 (diff)
downloadscala-48cc8b47fcadaa187026ca0422178c9094e4b412.tar.gz
scala-48cc8b47fcadaa187026ca0422178c9094e4b412.tar.bz2
scala-48cc8b47fcadaa187026ca0422178c9094e4b412.zip
Modularized the repl.
Following in the footsteps of scaladoc and interactive. The interpreter sources move into src/repl, and are given a separate build target. As with the others, at present they are still packaged into scala-compiler.jar. A summary of changes: - repl requires use of ReplGlobal (this was already implied) - macro code's repl-specific classloader hack pulled into overridable method and overridden in ReplGlobal - removed -Ygen-javap option to eliminate backend's dependency on javap - removed -Yrepl-debug option (can still be enabled with -Dscala.repl.debug) - pushed javap code into src/repl so javax.tools dependency can bee weakened to the repl only - removed some "show pickled" related code which hasn't worked right in a while and isn't the right way to do it anymore anyway. Will return to fix showPickled and provide it with some tests.
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml39
1 files changed, 35 insertions, 4 deletions
diff --git a/build.xml b/build.xml
index c1deb7ce6f..7e4948c938 100644
--- a/build.xml
+++ b/build.xml
@@ -1095,6 +1095,32 @@ QUICK BUILD (QUICK)
<stopwatch name="quick.comp.timer" action="total"/>
</target>
+ <target name="quick.pre-repl" depends="quick.comp">
+ <uptodate property="quick.repl.available" targetfile="${build-quick.dir}/repl.complete">
+ <srcfiles dir="${src.dir}/repl" />
+ </uptodate>
+ </target>
+
+ <target name="quick.repl" depends="quick.pre-repl" unless="quick.repl.available">
+ <mkdir dir="${build-quick.dir}/classes/repl"/>
+ <scalacfork
+ destdir="${build-quick.dir}/classes/repl"
+ compilerpathref="quick.classpath"
+ params="${scalac.args.quick}"
+ srcdir="${src.dir}/repl"
+ jvmargs="${scalacfork.jvmargs}">
+ <include name="**/*.scala"/>
+ <compilationpath>
+ <pathelement location="${build-quick.dir}/classes/library"/>
+ <pathelement location="${build-quick.dir}/classes/reflect"/>
+ <pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/repl"/>
+ <pathelement location="${jline.jar}"/>
+ </compilationpath>
+ </scalacfork>
+ <touch file="${build-quick.dir}/repl.complete" verbose="no"/>
+ </target>
+
<target name="quick.swing" depends="quick.comp" if="has.java6" unless="quick.comp.available">
<scalacfork
destdir="${build-quick.dir}/classes/library"
@@ -1107,7 +1133,7 @@ QUICK BUILD (QUICK)
</scalacfork>
</target>
- <target name="quick.pre-plugins" depends="quick.comp">
+ <target name="quick.pre-plugins" depends="quick.repl" unless="quick.repl.available">
<uptodate property="quick.plugins.available" targetfile="${build-quick.dir}/plugins.complete">
<srcfiles dir="${src.dir}/continuations"/>
</uptodate>
@@ -1229,6 +1255,7 @@ QUICK BUILD (QUICK)
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/repl"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
<path refid="asm.classpath"/>
@@ -1247,6 +1274,7 @@ QUICK BUILD (QUICK)
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/repl"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
@@ -1358,11 +1386,12 @@ QUICK BUILD (QUICK)
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/repl"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
+ <pathelement location="${jline.jar}"/>
+ <path refid="asm.classpath"/>
<path refid="forkjoin.classpath"/>
<path refid="aux.libs"/>
- <path refid="asm.classpath"/>
- <pathelement location="${jline.jar}"/>
</path>
<taskdef name="quick-bin" classname="scala.tools.ant.ScalaTool" classpathref="quick.bin.classpath"/>
<mkdir dir="${build-quick.dir}/bin"/>
@@ -1488,6 +1517,7 @@ PACKED QUICK BUILD (PACK)
<fileset dir="${build-quick.dir}/classes/compiler"/>
<fileset dir="${build-quick.dir}/classes/scaladoc"/>
<fileset dir="${build-quick.dir}/classes/interactive"/>
+ <fileset dir="${build-quick.dir}/classes/repl"/>
<fileset dir="${build-asm.dir}/classes"/>
</jar>
<copy file="${jline.jar}" toDir="${build-pack.dir}/lib"/>
@@ -1998,10 +2028,11 @@ SBT Compiler Interface
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
- <pathelement location="${build-quick.dir}/classes/scaladoc"/>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/scaladoc"/>
+ <pathelement location="${build-quick.dir}/classes/repl"/>
<pathelement location="${sbt.interface.jar}"/>
<path refid="forkjoin.classpath"/>
</compilationpath>