summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-01-30 13:23:24 +0100
committerMartin Odersky <odersky@gmail.com>2012-01-30 13:23:24 +0100
commitdf01dc8d91852a7d663a8fe4a15fef52933bab25 (patch)
treed7466f06f2c110901578b666af50295ae482287d /src/compiler
parent5118fd0d0894012da2e9fc95ee4c6ae5de198bd4 (diff)
downloadscala-df01dc8d91852a7d663a8fe4a15fef52933bab25.tar.gz
scala-df01dc8d91852a7d663a8fe4a15fef52933bab25.tar.bz2
scala-df01dc8d91852a7d663a8fe4a15fef52933bab25.zip
Fixed problems with step 2
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala9
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala6
2 files changed, 8 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 8ed3393796..1092c7bce1 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -867,7 +867,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
/** Counts for certain classes of warnings during this run. */
var deprecationWarnings: List[(Position, String)] = Nil
var uncheckedWarnings: List[(Position, String)] = Nil
-
+
/** A flag whether macro expansions failed */
var macroExpansionFailed = false
@@ -1014,7 +1014,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
}
def cancel() { reporter.cancelled = true }
-
+
private def currentProgress = (phasec * size) + unitc
private def totalProgress = (phaseDescriptors.size - 1) * size // -1: drops terminal phase
private def refreshProgress() = if (size > 0) progress(currentProgress, totalProgress)
@@ -1031,6 +1031,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
val namerPhase = phaseNamed("namer")
// packageobjects
val typerPhase = phaseNamed("typer")
+ val inlineclassesPhase = phaseNamed("inlineclasses")
// superaccessors
val picklerPhase = phaseNamed("pickler")
val refchecksPhase = phaseNamed("refchecks")
@@ -1180,12 +1181,12 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
*/
def compileUnits(units: List[CompilationUnit], fromPhase: Phase) {
try compileUnitsInternal(units, fromPhase)
- catch { case ex =>
+ catch { case ex =>
globalError(supplementErrorMessage("uncaught exception during compilation: " + ex.getClass.getName))
throw ex
}
}
-
+
private def compileUnitsInternal(units: List[CompilationUnit], fromPhase: Phase) {
units foreach addUnit
if (opt.profileAll) {
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 50350455a1..51941408a2 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -602,7 +602,7 @@ abstract class Erasure extends AddInterfaces
Console.println("exception when typing " + tree)
Console.println(er.msg + " in file " + context.owner.sourceFile)
er.printStackTrace
- abort()
+ abort("unrecoverable error")
case ex: Exception =>
//if (settings.debug.value)
try Console.println("exception when typing " + tree)
@@ -986,8 +986,8 @@ abstract class Erasure extends AddInterfaces
}
} else if (fn.symbol.owner.isRefinementClass && !fn.symbol.isOverridingSymbol) {
ApplyDynamic(qualifier, args) setSymbol fn.symbol setPos tree.pos
- } else if (false && fn.symbol.owner.isInlineClass && classInlining.hasUnboxedVersion(fn.symbol)) {
- Apply(gen.mkAttributedRef(classInlining.staticMethod(fn.symbol)), qualifier :: args)
+ } else if (fn.symbol.owner.isInlineClass && classInlining.hasUnboxedVersion(fn.symbol)) {
+ Apply(gen.mkAttributedRef(classInlining.unboxedMethod(fn.symbol)), qualifier :: args)
} else {
tree
}