File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
src/dotty/tools/backend/jvm Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 6
6
# Configuration
7
7
SCALA_VERSION=2.11.5
8
8
SCALA_BINARY_VERSION=2.11
9
- SCALA_COMPILER_VERSION=2.11.5-20150402-193021-0c75410da3
9
+ SCALA_COMPILER_VERSION=2.11.5-20150416-144435-09c4a520e1
10
10
DOTTY_VERSION=0.1
11
11
JLINE_VERSION=2.12
12
12
bootcp=true
@@ -57,13 +57,13 @@ checkjar $TEST_JAR test:package
57
57
58
58
# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
59
59
if [ " $SCALA_LIBRARY_JAR " == " " ]
60
- then
60
+ then
61
61
SCALA_LIBRARY_JAR=$HOME /.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-$SCALA_VERSION .jar
62
62
# this is location where sbt stores it in ivy cache
63
63
fi
64
64
# save as for scala-library now for scala-reflect
65
65
if [ " $SCALA_REFLECT_JAR " == " " ]
66
- then
66
+ then
67
67
SCALA_REFLECT_JAR=$HOME /.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-$SCALA_VERSION .jar
68
68
fi
69
69
if [ " $SCALA_COMPILER_JAR " == " " ]
72
72
fi
73
73
74
74
if [ " $JLINE_JAR " == " " ]
75
- then
75
+ then
76
76
JLINE_JAR=$HOME /.ivy2//cache/jline/jline/jars/jline-$JLINE_VERSION .jar
77
77
fi
78
78
79
79
if [ ! -f " $SCALA_LIBRARY_JAR " -o ! -f " $SCALA_REFLECT_JAR " -o ! -f " $SCALA_COMPILER_JAR " -o ! -f " $JLINE_JAR " ]
80
80
then
81
- echo To use this script please set
81
+ echo To use this script please set
82
82
echo SCALA_LIBRARY_JAR to point to scala-library-$SCALA_VERSION .jar " (currently $SCALA_LIBRARY_JAR )"
83
83
echo SCALA_REFLECT_JAR to point to scala-reflect-$SCALA_VERSION .jar " (currently $SCALA_REFLECT_JAR )"
84
84
echo SCALA_COMPILER_JAR to point to scala-compiler-$SCALA_VERSION .jar with bcode patches " (currently $SCALA_COMPILER_JAR )"
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ object DottyBuild extends Build {
31
31
// get reflect and xml onboard
32
32
libraryDependencies ++= Seq (" org.scala-lang" % " scala-reflect" % scalaVersion.value,
33
33
" org.scala-lang.modules" %% " scala-xml" % " 1.0.1" ,
34
- " me.d-d" % " scala-compiler" % " 2.11.5-20150402-193021-0c75410da3 " ,
34
+ " me.d-d" % " scala-compiler" % " 2.11.5-20150416-144435-09c4a520e1 " ,
35
35
" jline" % " jline" % " 2.12" ),
36
36
37
37
// get junit onboard
Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
103
103
val BoxesRunTimeModule = ctx.requiredModule(" scala.runtime.BoxesRunTime" )
104
104
val BoxesRunTimeClass = toDenot(BoxesRunTimeModule ).moduleClass.asClass
105
105
106
+ // require LambdaMetafactory: scalac uses getClassIfDefined, but we need those always.
107
+ override lazy val LambdaMetaFactory = ctx.requiredClass(" java.lang.invoke.LambdaMetafactory" )
108
+ override lazy val MethodHandle = ctx.requiredClass(" java.lang.invoke.MethodHandle" )
109
+
106
110
val nme_valueOf : Name = StdNames .nme.valueOf
107
111
val nme_apply = StdNames .nme.apply
108
112
val NothingClass : Symbol = defn.NothingClass
@@ -423,7 +427,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
423
427
case TermRef (prefix : ThisType , name) =>
424
428
Some (tpd.This (prefix.cls).select(i.symbol))
425
429
case TermRef (NoPrefix , name) =>
426
- if (i.symbol is Flags .Method ) Some (This (i.symbol.enclosingClass ).select(i.symbol)) // workaround #342 todo: remove after fixed
430
+ if (i.symbol is Flags .Method ) Some (This (i.symbol.topLevelClass ).select(i.symbol)) // workaround #342 todo: remove after fixed
427
431
else None
428
432
case _ => None
429
433
}
You can’t perform that action at this time.
0 commit comments