Skip to content

Commit 330c77b

Browse files
committed
Merge commit 'refs/pull/1717/head' into merge-msil-genjvm-delete
* commit 'refs/pull/1717/head': SI-6769 Removes GenJVM backend Conflicts: src/compiler/scala/tools/nsc/backend/jvm/GenAndroid.scala
2 parents b1cb657 + 06844ee commit 330c77b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+29
-10258
lines changed

META-INF/MANIFEST.MF

-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Eclipse-LazyStart: true
77
Bundle-ClassPath:
88
.,
99
bin,
10-
lib/fjbg.jar,
1110
lib/jline.jar,
1211
lib/msil.jar
1312
Export-Package:
@@ -50,8 +49,6 @@ Export-Package:
5049
ch.epfl.lamp.compiler.msil,
5150
ch.epfl.lamp.compiler.msil.emit,
5251
ch.epfl.lamp.compiler.msil.util,
53-
ch.epfl.lamp.fjbg,
54-
ch.epfl.lamp.util
5552
Require-Bundle:
5653
org.apache.ant,
5754
org.scala-ide.scala.library

README.rst

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ build script or user-created if needed. This is not a complete listing. ::
1818
+--dist/ The destination folder for Scala distributions.
1919
+--docs/ Documentation and sample code.
2020
+--lib/ Pre-compiled libraries for the build.
21-
| +--fjbg.jar The Java byte-code generation library.
2221
| +--scala-compiler.jar The stable reference ('starr') compiler jar
2322
| +--scala-library.jar The stable reference ('starr') library jar
2423
| +--scala-library-src.jar A snapshot of the source used to build starr.

build.detach.xml

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ QUICK BUILD (QUICK)
7272
<path id="quick.classpath">
7373
<pathelement location="${build-quick.dir}/classes/library"/>
7474
<pathelement location="${build-quick.dir}/classes/compiler"/>
75-
<pathelement location="${lib.dir}/fjbg.jar"/>
7675
<pathelement location="${lib.dir}/msil.jar"/>
7776
<pathelement location="${lib.dir}/forkjoin.jar"/>
7877
<pathelement location="${ant.home}/lib/ant.jar"/>

build.examples.xml

-12
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ PROPERTIES
2828
<!-- Location of pre-compiled libraries properties -->
2929
<property name="scala.lib.jar" value="${lib.dir}/scala-library.jar"/>
3030
<property name="scala.comp.jar" value="${lib.dir}/scala-compiler.jar"/>
31-
<property name="fjbg.name" value="fjbg.jar"/>
32-
<property name="fjbg.jar" value="${lib.dir}/${fjbg.name}"/>
3331
<property name="msil.name" value="msil.jar"/>
3432
<property name="msil.jar" value="${lib.dir}/${msil.name}"/>
3533
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
@@ -81,15 +79,6 @@ INITIALISATION
8179
/>
8280
</not></condition>
8381
</fail>
84-
<echo level="verbose" message="fjbg.jar=${fjbg.jar}"/>
85-
<fail message="FJBG library in '${lib.dir}/' is not available">
86-
<condition><not>
87-
<available
88-
classname="ch.epfl.lamp.fjbg.JCode"
89-
classpath="${fjbg.jar}"
90-
/>
91-
</not></condition>
92-
</fail>
9382
<echo level="verbose" message="msil.jar=${msil.jar}"/>
9483
<fail message="MSIL library in '${lib.dir}/' is not available">
9584
<condition><not>
@@ -111,7 +100,6 @@ INITIALISATION
111100
</fail>
112101
<!-- Creating class-pathes -->
113102
<path id="common.classpath">
114-
<pathelement location="${fjbg.jar}"/>
115103
<pathelement location="${msil.jar}"/>
116104
</path>
117105
<path id="scala.classpath">

build.xml

+2-65
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ INITIALISATION
461461
<!-- Libraries only used for STARR -->
462462
<path id="starr.dep.libs">
463463
<fileset dir="${lib.dir}">
464-
<include name="fjbg.jar"/>
465464
<include name="forkjoin.jar"/>
466465
<include name="msil.jar"/>
467466
</fileset>
@@ -592,58 +591,11 @@ LOCAL DEPENDENCY (FORKJOIN)
592591
<delete file="${build-libs.dir}/forkjoin.complete" quiet="yes" failonerror="no"/>
593592
</target>
594593

595-
<!-- ===========================================================================
596-
LOCAL DEPENDENCY (FJBG)
597-
============================================================================ -->
598-
599-
<target name="fjbg.init" depends="init">
600-
<uptodate property="fjbg.available" targetfile="${build-libs.dir}/fjbg.complete">
601-
<srcfiles dir="${src.dir}/fjbg">
602-
<include name="**/*.java"/>
603-
<include name="**/*.scala"/>
604-
</srcfiles>
605-
</uptodate>
606-
</target>
607-
608-
<target name="fjbg.lib" depends="fjbg.init" unless="fjbg.available">
609-
<stopwatch name="fjbg.lib.timer" />
610-
<mkdir dir="${build-libs.dir}/classes/fjbg"/>
611-
<javac
612-
srcdir="${src.dir}/fjbg"
613-
destdir="${build-libs.dir}/classes/fjbg"
614-
classpath="${build-libs.dir}/classes/fjbg"
615-
includes="**/*.java"
616-
debug="true"
617-
target="1.6" source="1.4">
618-
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
619-
</javac>
620-
<touch file="${build-libs.dir}/fjbg.complete" verbose="no"/>
621-
<stopwatch name="fjbg.lib.timer" action="total"/>
622-
</target>
623-
624-
<target name="fjbg.pack" depends="fjbg.lib">
625-
<jar destfile="${build-libs.dir}/fjbg.jar">
626-
<fileset dir="${build-libs.dir}/classes/fjbg"/>
627-
</jar>
628-
</target>
629-
630-
<target name="fjbg.done" depends="fjbg.pack">
631-
<!-- TODO - jar or classfiles? -->
632-
<path id="fjbg.classpath">
633-
<pathelement location="${build-libs.dir}/classes/fjbg"/>
634-
</path>
635-
</target>
636-
637-
<target name="fjbg.clean" depends="init">
638-
<delete dir="${build-libs.dir}/classes/fjbg" includeemptydirs="yes" quiet="yes" failonerror="no"/>
639-
<delete file="${build-libs.dir}/fjbg.complete" quiet="yes" failonerror="no"/>
640-
</target>
641-
642594
<!-- ===========================================================================
643595
LOCAL REFERENCE BUILD (LOCKER)
644596
============================================================================ -->
645597

646-
<target name="locker.start" depends="asm.done, forkjoin.done, fjbg.done">
598+
<target name="locker.start" depends="asm.done, forkjoin.done">
647599
<condition property="locker.available">
648600
<available file="${build-locker.dir}/all.complete"/>
649601
</condition>
@@ -790,7 +742,6 @@ LOCAL REFERENCE BUILD (LOCKER)
790742
<pathelement location="${build-locker.dir}/classes/library"/>
791743
<pathelement location="${build-locker.dir}/classes/reflect"/>
792744
<pathelement location="${build-locker.dir}/classes/compiler"/>
793-
<path refid="fjbg.classpath"/>
794745
<path refid="aux.libs"/>
795746
<pathelement location="${jline.jar}"/>
796747
</compilationpath>
@@ -809,7 +760,6 @@ LOCAL REFERENCE BUILD (LOCKER)
809760
<pathelement location="${build-locker.dir}/classes/library"/>
810761
<pathelement location="${build-locker.dir}/classes/reflect"/>
811762
<pathelement location="${build-locker.dir}/classes/compiler"/>
812-
<path refid="fjbg.classpath"/>
813763
<path refid="aux.libs"/>
814764
<path refid="asm.classpath"/>
815765
<pathelement location="${locker.comp.msil}" />
@@ -845,7 +795,6 @@ LOCAL REFERENCE BUILD (LOCKER)
845795
<pathelement location="${build-locker.dir}/classes/library"/>
846796
<pathelement location="${build-locker.dir}/classes/reflect"/>
847797
<pathelement location="${build-locker.dir}/classes/compiler"/>
848-
<path refid="fjbg.classpath"/>
849798
<path refid="forkjoin.classpath"/>
850799
<path refid="asm.classpath"/>
851800
<path refid="aux.libs"/>
@@ -855,7 +804,6 @@ LOCAL REFERENCE BUILD (LOCKER)
855804
<pathelement location="${build-quick.dir}/classes/library"/>
856805
<pathelement location="${build-quick.dir}/classes/reflect"/>
857806
<pathelement location="${build-quick.dir}/classes/compiler"/>
858-
<path refid="fjbg.classpath"/>
859807
<path refid="forkjoin.classpath"/>
860808
<path refid="asm.classpath"/>
861809
<path refid="aux.libs"/>
@@ -953,7 +901,6 @@ PACKED LOCKER BUILD (PALO)
953901
<jar destfile="${build-palo.dir}/lib/scala-compiler.jar" manifest="${basedir}/META-INF/MANIFEST.MF">
954902
<fileset dir="${build-locker.dir}/classes/compiler"/>
955903
<fileset dir="${build-asm.dir}/classes/"/>
956-
<fileset dir="${build-libs.dir}/classes/fjbg"/>
957904
</jar>
958905
<copy file="${jline.jar}" toDir="${build-palo.dir}/lib"/>
959906
</target>
@@ -1185,7 +1132,6 @@ QUICK BUILD (QUICK)
11851132
<pathelement location="${build-quick.dir}/classes/library"/>
11861133
<pathelement location="${build-quick.dir}/classes/reflect"/>
11871134
<pathelement location="${build-quick.dir}/classes/compiler"/>
1188-
<path refid="fjbg.classpath"/>
11891135
<path refid="aux.libs"/>
11901136
<pathelement location="${jline.jar}"/>
11911137
</compilationpath>
@@ -1203,7 +1149,6 @@ QUICK BUILD (QUICK)
12031149
<pathelement location="${build-quick.dir}/classes/compiler"/>
12041150
<path refid="aux.libs"/>
12051151
<path refid="forkjoin.classpath"/>
1206-
<path refid="fjbg.classpath"/>
12071152
<path refid="asm.classpath"/>
12081153
<pathelement location="${jline.jar}"/>
12091154
</compilationpath>
@@ -1254,7 +1199,6 @@ QUICK BUILD (QUICK)
12541199
<pathelement location="${build-quick.dir}/classes/compiler"/>
12551200
<pathelement location="${build-quick.dir}/classes/continuations-plugin"/>
12561201
<path refid="forkjoin.classpath"/>
1257-
<path refid="fjbg.classpath"/>
12581202
<path refid="aux.libs"/>
12591203
</compilationpath>
12601204
</scalacfork>
@@ -1376,7 +1320,6 @@ QUICK BUILD (QUICK)
13761320
<pathelement location="${build-quick.dir}/classes/partest"/>
13771321
<pathelement location="${ant.jar}"/>
13781322
<path refid="forkjoin.classpath"/>
1379-
<path refid="fjbg.classpath"/>
13801323
<pathelement location="${scalacheck.jar}"/>
13811324
</compilationpath>
13821325
</scalacfork>
@@ -1406,7 +1349,6 @@ QUICK BUILD (QUICK)
14061349
<pathelement location="${build-quick.dir}/classes/compiler"/>
14071350
<pathelement location="${build-quick.dir}/classes/scalap"/>
14081351
<path refid="forkjoin.classpath"/>
1409-
<path refid="fjbg.classpath"/>
14101352
<path refid="aux.libs"/>
14111353
<path refid="asm.classpath"/>
14121354
<pathelement location="${jline.jar}"/>
@@ -1533,7 +1475,6 @@ PACKED QUICK BUILD (PACK)
15331475
<jar destfile="${build-pack.dir}/lib/scala-compiler.jar" manifest="${build-pack.dir}/META-INF/MANIFEST.MF">
15341476
<fileset dir="${build-quick.dir}/classes/compiler"/>
15351477
<fileset dir="${build-asm.dir}/classes"/>
1536-
<fileset dir="${build-libs.dir}/classes/fjbg"/>
15371478
</jar>
15381479
<copy file="${jline.jar}" toDir="${build-pack.dir}/lib"/>
15391480
<copy todir="${build-pack.dir}/lib">
@@ -1967,7 +1908,6 @@ BOOTSTRAPPING BUILD (STRAP)
19671908
<pathelement location="${build-strap.dir}/classes/library"/>
19681909
<pathelement location="${build-strap.dir}/classes/reflect"/>
19691910
<pathelement location="${build-strap.dir}/classes/compiler"/>
1970-
<path refid="fjbg.classpath"/>
19711911
<path refid="aux.libs"/>
19721912
<pathelement location="${jline.jar}"/>
19731913
</compilationpath>
@@ -1985,7 +1925,6 @@ BOOTSTRAPPING BUILD (STRAP)
19851925
<pathelement location="${build-strap.dir}/classes/compiler"/>
19861926
<path refid="aux.libs"/>
19871927
<path refid="forkjoin.classpath"/>
1988-
<path refid="fjbg.classpath"/>
19891928
<path refid="asm.classpath"/>
19901929
<pathelement location="${jline.jar}"/>
19911930
</compilationpath>
@@ -2036,7 +1975,6 @@ BOOTSTRAPPING BUILD (STRAP)
20361975
<pathelement location="${build-strap.dir}/classes/compiler"/>
20371976
<pathelement location="${build-strap.dir}/classes/continuations-plugin"/>
20381977
<path refid="forkjoin.classpath"/>
2039-
<path refid="fjbg.classpath"/>
20401978
<path refid="aux.libs"/>
20411979
</compilationpath>
20421980
</scalacfork>
@@ -2168,7 +2106,7 @@ BOOTSTRAPPING BUILD (STRAP)
21682106
</target>
21692107

21702108
<!-- ===========================================================================
2171-
LIBRARIES (Forkjoin, FJBG, ASM)
2109+
LIBRARIES (Forkjoin, ASM)
21722110
============================================================================ -->
21732111

21742112

@@ -2834,7 +2772,6 @@ STABLE REFERENCE (STARR)
28342772
<jar destfile="${basedir}/lib/scala-compiler-src.jar">
28352773
<fileset dir="${basedir}/src/compiler"/>
28362774
<fileset dir="${basedir}/src/asm"/>
2837-
<fileset dir="${basedir}/src/fjbg"/>
28382775
<fileset dir="${basedir}/src/msil"/>
28392776
</jar>
28402777
</target>

lib/fjbg.jar.desired.sha1

-1
This file was deleted.

project/Build.scala

+4-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
2424
)
2525

2626
// Collections of projects to run 'compile' on.
27-
lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, swing, forkjoin, fjbg)
27+
lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, swing, forkjoin)
2828
// Collection of projects to 'package' and 'publish' together.
2929
lazy val packagedBinaryProjects = Seq(scalaLibrary, scalaCompiler, swing, actors, continuationsPlugin, jline, scalap)
3030
lazy val partestRunProjects = Seq(testsuite, continuationsTestsuite)
@@ -82,7 +82,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
8282
makeExplodedDist <<= (makeExplodedDist in scaladist).identity,
8383
// Note: We override unmanagedSources so that ~ compile will look at all these sources, then run our aggregated compile...
8484
unmanagedSourceDirectories in Compile <<= baseDirectory apply (_ / "src") apply { dir =>
85-
Seq("library/scala","actors","compiler","fjbg","swing","continuations/library","forkjoin") map (dir / _)
85+
Seq("library/scala","actors","compiler","swing","continuations/library","forkjoin") map (dir / _)
8686
},
8787
// TODO - Make exported products == makeDist so we can use this when creating a *real* distribution.
8888
commands += Release.pushStarr
@@ -132,8 +132,6 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
132132

133133
// Jline nested project. Compile this sucker once and be done.
134134
lazy val jline = Project("jline", file("src/jline"))
135-
// Fast Java Bytecode Generator (nested in every scala-compiler.jar)
136-
lazy val fjbg = Project("fjbg", file(".")) settings(settingOverrides : _*)
137135
// Our wrapped version of msil.
138136
lazy val asm = Project("asm", file(".")) settings(settingOverrides : _*)
139137
// Forkjoin backport
@@ -283,7 +281,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
283281
// --------------------------------------------------------------
284282
// Real Compiler Artifact
285283
// --------------------------------------------------------------
286-
lazy val packageScalaBinTask = Seq(quickComp, fjbg, asm).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
284+
lazy val packageScalaBinTask = Seq(quickComp, asm).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
287285
lazy val scalaBinArtifactSettings : Seq[Setting[_]] = inConfig(Compile)(Defaults.packageTasks(packageBin, packageScalaBinTask)) ++ Seq(
288286
name := "scala-compiler",
289287
crossPaths := false,
@@ -331,6 +329,6 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
331329
lazy val documentation = (
332330
Project("documentation", file("."))
333331
settings (documentationSettings: _*)
334-
dependsOn(quickLib, quickComp, actors, fjbg, forkjoin, swing, continuationsLibrary)
332+
dependsOn(quickLib, quickComp, actors, forkjoin, swing, continuationsLibrary)
335333
)
336334
}

project/Layers.scala

+5-8
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ trait Layers extends Build {
1313
def jline: Project
1414
/** Reference to forkjoin library */
1515
def forkjoin: Project
16-
/** Reference to Fast-Java-Bytecode-Generator library */
17-
def fjbg: Project
1816
/** Reference to the ASM wrapped project. */
1917
def asm: Project
2018
/** A setting that adds some external dependencies. */
@@ -23,18 +21,17 @@ trait Layers extends Build {
2321
def aaa_root: Project
2422

2523
/** Creates a reference Scala version that can be used to build other projects. This takes in the raw
26-
* library, compiler and fjbg libraries as well as a string representing the layer name (used for compiling the compile-interface).
24+
* library, compiler as well as a string representing the layer name (used for compiling the compile-interface).
2725
*/
2826
def makeScalaReference(layer: String, library: Project, reflect: Project, compiler: Project) =
2927
scalaInstance <<= (appConfiguration in library,
3028
version in library,
3129
(exportedProducts in library in Compile),
3230
(exportedProducts in reflect in Compile),
3331
(exportedProducts in compiler in Compile),
34-
(exportedProducts in fjbg in Compile),
3532
(fullClasspath in jline in Runtime),
3633
(exportedProducts in asm in Runtime)) map {
37-
(app, version: String, lib: Classpath, reflect: Classpath, comp: Classpath, fjbg: Classpath, jline: Classpath, asm: Classpath) =>
34+
(app, version: String, lib: Classpath, reflect: Classpath, comp: Classpath, jline: Classpath, asm: Classpath) =>
3835
val launcher = app.provider.scalaProvider.launcher
3936
(lib,comp) match {
4037
case (Seq(libraryJar), Seq(compilerJar)) =>
@@ -43,14 +40,14 @@ trait Layers extends Build {
4340
libraryJar.data,
4441
compilerJar.data,
4542
launcher,
46-
((fjbg.files ++ jline.files ++ asm.files ++ reflect.files):_*))
43+
((jline.files ++ asm.files ++ reflect.files):_*))
4744
case _ => error("Cannot build a ScalaReference with more than one classpath element")
4845
}
4946
}
5047

5148
/** Creates a "layer" of Scala compilation. That is, this will build the next version of Scala from a previous version.
5249
* Returns the library project and compiler project from the next layer.
53-
* Note: The library and compiler are not *complete* in the sense that they are missing things like "actors" and "fjbg".
50+
* Note: The library and compiler are not *complete* in the sense that they are missing things like "actors".
5451
*/
5552
def makeLayer(layer: String, referenceScala: Setting[Task[ScalaInstance]], autoLock: Boolean = false) : (Project, Project, Project) = {
5653
val autoLockSettings: Seq[Setting[_]] =
@@ -108,7 +105,7 @@ trait Layers extends Build {
108105
dirs.descendentsExcept( ("*.xml" | "*.html" | "*.gif" | "*.png" | "*.js" | "*.css" | "*.tmpl" | "*.swf" | "*.properties" | "*.txt"),"*.scala").get
109106
},
110107
// TODO - Use depends on *and* SBT's magic dependency mechanisms...
111-
unmanagedClasspath in Compile <<= Seq(forkjoin, library, reflect, fjbg, jline, asm).map(exportedProducts in Compile in _).join.map(_.flatten),
108+
unmanagedClasspath in Compile <<= Seq(forkjoin, library, reflect, jline, asm).map(exportedProducts in Compile in _).join.map(_.flatten),
112109
externalDeps,
113110
referenceScala
114111
)

project/Packaging.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait Packaging { self: ScalaBuild.type =>
1919
genBin <<= genBinTask(genBinRunner, binDir, fullClasspath in Runtime, false),
2020
binDir in genBinQuick <<= baseDirectory apply (_ / "target" / "bin"),
2121
// Configure the classpath this way to avoid having .jar files and previous layers on the classpath.
22-
fullClasspath in Runtime in genBinQuick <<= Seq(quickComp,quickLib,scalap,actors,swing,fjbg,jline,forkjoin).map(classDirectory in Compile in _).join.map(Attributed.blankSeq),
22+
fullClasspath in Runtime in genBinQuick <<= Seq(quickComp,quickLib,scalap,actors,swing,jline,forkjoin).map(classDirectory in Compile in _).join.map(Attributed.blankSeq),
2323
fullClasspath in Runtime in genBinQuick <++= (fullClasspath in Compile in jline),
2424
genBinQuick <<= genBinTask(genBinRunner, binDir in genBinQuick, fullClasspath in Runtime in genBinQuick, true),
2525
runManmakerMan <<= runManmakerTask(fullClasspath in Runtime in manmaker, runner in manmaker, "scala.tools.docutil.EmitManPage", "man1", ".1"),

project/Testing.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ trait Testing { self: ScalaBuild.type =>
3434
val continuationsTestsuite = (
3535
Project("continuations-testsuite", file("."))
3636
settings (continuationsTestsuiteSettings:_*)
37-
dependsOn (partest, scalaLibrary, scalaCompiler, fjbg)
37+
dependsOn (partest, scalaLibrary, scalaCompiler)
3838
)
3939

4040
}

src/compiler/scala/tools/ant/Scalac.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
100100

101101
/** Defines valid values for the `target` property. */
102102
object Target extends PermissibleValue {
103-
val values = List("jvm-1.5", "jvm-1.5-fjbg", "jvm-1.5-asm", "jvm-1.6", "jvm-1.7", "msil")
103+
val values = List("jvm-1.5", "jvm-1.6", "jvm-1.7", "msil")
104104
}
105105

106106
/** Defines valid values for the `deprecation` and `unchecked` properties. */

0 commit comments

Comments
 (0)