Skip to content

Commit

Permalink
Merge pull request #2623 from paulp/pr/merge
Browse files Browse the repository at this point in the history
Merge 2.10.x/2.10.2 into master.
  • Loading branch information
adriaanm committed Jun 4, 2013
2 parents fb06073 + 767a25f commit 4a8887c
Show file tree
Hide file tree
Showing 41 changed files with 799 additions and 693 deletions.
5 changes: 1 addition & 4 deletions src/actors/scala/actors/scheduler/ThreadPoolConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ private[actors] object ThreadPoolConfig {
(propIsSetTo("actors.enableForkJoin", "true") || {
Debug.info(this+": java.version = "+javaVersion)
Debug.info(this+": java.vm.vendor = "+javaVmVendor)

// on IBM J9 1.6 do not use ForkJoinPool
// XXX this all needs to go into Properties.
isJavaAtLeast("1.6") && ((javaVmVendor contains "Oracle") || (javaVmVendor contains "Sun") || (javaVmVendor contains "Apple"))
isJavaAtLeast("1.6")
})
catch {
case _: SecurityException => false
Expand Down
5 changes: 4 additions & 1 deletion src/compiler/scala/reflect/reify/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ package object reify {
def reifyType(global: Global)(typer: global.analyzer.Typer,universe: global.Tree, mirror: global.Tree, tpe: global.Type, concrete: Boolean = false): global.Tree =
mkReifier(global)(typer, universe, mirror, tpe, concrete = concrete).reification.asInstanceOf[global.Tree]

def reifyRuntimeClass(global: Global)(typer0: global.analyzer.Typer, tpe: global.Type, concrete: Boolean = true): global.Tree = {
def reifyRuntimeClass(global: Global)(typer0: global.analyzer.Typer, tpe0: global.Type, concrete: Boolean = true): global.Tree = {
import global._
import definitions._
import analyzer.enclosingMacroPosition

// SI-7375
val tpe = tpe0.dealiasWiden

if (tpe.isSpliceable) {
val classTagInScope = typer0.resolveClassTag(enclosingMacroPosition, tpe, allowMaterialization = false)
if (!classTagInScope.isEmpty) return Select(classTagInScope, nme.runtimeClass)
Expand Down
9 changes: 4 additions & 5 deletions src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,9 @@ self =>
* }}}
*/
def postfixExpr(): Tree = {
val base = opstack
var top = prefixExpr()
val start = in.offset
val base = opstack
var top = prefixExpr()

while (isIdent) {
top = reduceStack(isExpr = true, base, top, precedence(in.name), leftAssoc = treeInfo.isLeftAssoc(in.name))
Expand All @@ -1442,9 +1443,7 @@ self =>
val topinfo = opstack.head
opstack = opstack.tail
val od = stripParens(reduceStack(isExpr = true, base, topinfo.operand, 0, leftAssoc = true))
return atPos(od.pos.startOrPoint, topinfo.offset) {
new PostfixSelect(od, topinfo.operator.encode)
}
return makePostfixSelect(start, topinfo.offset, od, topinfo.operator)
}
}
reduceStack(isExpr = true, base, top, 0, leftAssoc = true)
Expand Down
6 changes: 6 additions & 0 deletions src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ abstract class TreeBuilder {
Assign(lhs, rhs)
}

/** Tree for `od op`, start is start0 if od.pos is borked. */
def makePostfixSelect(start0: Int, end: Int, od: Tree, op: Name): Tree = {
val start = if (od.pos.isDefined) od.pos.startOrPoint else start0
atPos(r2p(start, end, end)) { new PostfixSelect(od, op.encode) }
}

/** A type tree corresponding to (possibly unary) intersection type */
def makeIntersectionTypeTree(tps: List[Tree]): Tree =
if (tps.tail.isEmpty) tps.head
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,10 @@ abstract class ClassfileParser {
}
}

val c = if (currentIsTopLevel) pool.getClassSymbol(nameIdx) else clazz
if (currentIsTopLevel) {
val isTopLevel = !(currentClass containsChar '$') // Java class name; *don't* try to to use Scala name decoding (SI-7532)

val c = if (isTopLevel) pool.getClassSymbol(nameIdx) else clazz
if (isTopLevel) {
if (c != clazz) {
if ((clazz eq NoSymbol) && (c ne NoSymbol)) clazz = c
else mismatchError(c)
Expand Down
Loading

0 comments on commit 4a8887c

Please sign in to comment.