Skip to content

Commit

Permalink
Merge pull request #3808 from lrytz/merge-211
Browse files Browse the repository at this point in the history
Merge 2.11.x into 2.12.x
  • Loading branch information
lrytz committed Jun 3, 2014
2 parents 8f9e952 + 9bfc5ed commit 9b37ade
Show file tree
Hide file tree
Showing 57 changed files with 1,267 additions and 1,136 deletions.
4 changes: 4 additions & 0 deletions bincompat-backward.whitelist.conf
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ filter {
{
matchName="scala.reflect.api.Internals#ReificationSupportApi.SyntacticExistentialType"
problemName=MissingMethodProblem
},
{
matchName="scala.reflect.runtime.SynchronizedOps.newNestedScope"
problemName=MissingMethodProblem
}
]
}
4 changes: 4 additions & 0 deletions bincompat-forward.whitelist.conf
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ filter {
{
matchName="scala.reflect.runtime.JavaMirrors#JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$followStatic"
problemName=MissingMethodProblem
},
{
matchName="scala.reflect.runtime.SynchronizedOps.newNestedScope"
problemName=MissingMethodProblem
}
]
}
5 changes: 5 additions & 0 deletions build-ant-macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,11 @@
<filter token="SCALA_FULL_VERSION" value="${scala.full.version}"/>
<filter token="SCALA_COMPILER_DOC_VERSION" value="${scala-compiler-doc.version.number}"/>
<filter token="SCALA_COMPILER_INTERACTIVE_VERSION" value="${scala-compiler-interactive.version.number}"/>
<filter token="XML_VERSION" value="${scala-xml.version.number}" />
<filter token="PARSER_COMBINATORS_VERSION" value="${scala-parser-combinators.version.number}" />
<filter token="CONTINUATIONS_PLUGIN_VERSION" value="${scala-continuations-plugin.version.number}" />
<filter token="CONTINUATIONS_LIBRARY_VERSION" value="${scala-continuations-library.version.number}" />
<filter token="SCALA_SWING_VERSION" value="${scala-swing.version.number}" />
</filterset>
</copy>
<bnd classpath="${@{project}.jar}" eclipse="false" failok="false" exceptions="true" files="${build-osgi.dir}/${@{project}.name}.bnd" output="${build-osgi.dir}"/>
Expand Down
2 changes: 2 additions & 0 deletions src/build/bnd/scala-actors.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ Bundle-SymbolicName: org.scala-lang.scala-actors
ver: @VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);${ver}}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
3 changes: 2 additions & 1 deletion src/build/bnd/scala-compiler-doc.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Bundle-SymbolicName: org.scala-lang.modules.scala-compiler-doc_@SCALA_BINARY_VER
ver: @SCALA_COMPILER_DOC_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: *
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
3 changes: 2 additions & 1 deletion src/build/bnd/scala-compiler-interactive.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Bundle-SymbolicName: org.scala-lang.modules.scala-compiler-interactive_@SCALA_BI
ver: @SCALA_COMPILER_INTERACTIVE_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: *
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
4 changes: 4 additions & 0 deletions src/build/bnd/scala-compiler.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: jline.*;resolution:=optional, \
org.apache.tools.ant.*;resolution:=optional, \
scala.util.parsing.*;version="${range;[====,====];@PARSER_COMBINATORS_VERSION@}";resolution:=optional, \
scala.xml.*;version="${range;[====,====];@XML_VERSION@}";resolution:=optional, \
scala.*;version="${range;[==,=+);${ver}}", \
*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
4 changes: 3 additions & 1 deletion src/build/bnd/scala-continuations-library.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Bundle-Name: Scala Delimited Continuations Library
Bundle-SymbolicName: org.scala-lang.plugins.scala-continuations-library
ver: @VERSION@
ver: @CONTINUATIONS_LIBRARY_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
4 changes: 3 additions & 1 deletion src/build/bnd/scala-continuations-plugin.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Bundle-Name: Scala Delimited Continuations Compiler Plugin
Bundle-SymbolicName: org.scala-lang.plugins.scala-continuations-plugin
ver: @VERSION@
ver: @CONTINUATIONS_PLUGIN_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
1 change: 1 addition & 0 deletions src/build/bnd/scala-library.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ver: @VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: sun.misc;resolution:=optional, *
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
4 changes: 3 additions & 1 deletion src/build/bnd/scala-parser-combinators.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Bundle-Name: Scala Parser Combinators Library
Bundle-SymbolicName: org.scala-lang.modules.scala-parser-combinators
ver: @VERSION@
ver: @PARSER_COMBINATORS_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
5 changes: 4 additions & 1 deletion src/build/bnd/scala-reflect.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ Bundle-SymbolicName: org.scala-lang.scala-reflect
ver: @VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.tools.nsc;resolution:=optional, *
Import-Package: scala.*;version="${range;[==,=+);${ver}}", \
scala.tools.nsc;resolution:=optional;version="${range;[==,=+);${ver}}", \
*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
4 changes: 3 additions & 1 deletion src/build/bnd/scala-swing.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Bundle-Name: Scala Swing
Bundle-SymbolicName: org.scala-lang.modules.scala-swing
ver: @VERSION@
ver: @SCALA_SWING_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6,JavaSE-1.7
4 changes: 3 additions & 1 deletion src/build/bnd/scala-xml.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Bundle-Name: Scala XML Library
Bundle-SymbolicName: org.scala-lang.modules.scala-xml
ver: @VERSION@
ver: @XML_VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
13 changes: 10 additions & 3 deletions src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1424,11 +1424,18 @@ abstract class GenICode extends SubComponent {
def genZandOrZor(and: Boolean): Boolean = {
val ctxInterm = ctx.newBlock()

val branchesReachable = if (and) genCond(lhs, ctx, ctxInterm, elseCtx)
val lhsBranchesReachable = if (and) genCond(lhs, ctx, ctxInterm, elseCtx)
else genCond(lhs, ctx, thenCtx, ctxInterm)
ctxInterm.bb killUnless branchesReachable
// If lhs is known to throw, we can kill the just created ctxInterm.
ctxInterm.bb killUnless lhsBranchesReachable

genCond(rhs, ctxInterm, thenCtx, elseCtx)
val rhsBranchesReachable = genCond(rhs, ctxInterm, thenCtx, elseCtx)

// Reachable means "it does not always throw", i.e. "it might not throw".
// In an expression (a && b) or (a || b), the b branch might not be evaluated.
// Such an expression is therefore known to throw only if both expressions throw. Or,
// successors are reachable if either of the two is reachable (SI-8625).
lhsBranchesReachable || rhsBranchesReachable
}
def genRefEq(isEq: Boolean) = {
val f = genEqEqPrimitive(lhs, rhs, ctx) _
Expand Down
8 changes: 8 additions & 0 deletions src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package scala.tools.nsc.backend.jvm
import scala.tools.asm.tree.{ClassNode, MethodNode}
import java.io.PrintWriter
import scala.tools.asm.util.{TraceClassVisitor, TraceMethodVisitor, Textifier}
import scala.tools.asm.ClassReader

object AsmUtils {

Expand Down Expand Up @@ -50,4 +51,11 @@ object AsmUtils {
w.flush()
}

def traceClass(bytes: Array[Byte]): Unit = traceClass(readClass(bytes))

def readClass(bytes: Array[Byte]): ClassNode = {
val node = new ClassNode()
new ClassReader(bytes).accept(node, 0)
node
}
}

0 comments on commit 9b37ade

Please sign in to comment.