summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-12-16 17:55:54 +0000
committerMartin Odersky <odersky@gmail.com>2005-12-16 17:55:54 +0000
commit13a89c1778de2f53945ba329be28482a528e024f (patch)
tree1660c0d295f2ebd1833ac8d282c7cb8359d300fa /sources
parent3478adbbd4b06a49c71a49e66689560662a83bd4 (diff)
downloadscala-13a89c1778de2f53945ba329be28482a528e024f.tar.gz
scala-13a89c1778de2f53945ba329be28482a528e024f.tar.bz2
scala-13a89c1778de2f53945ba329be28482a528e024f.zip
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/nsc/Global.scala4
-rw-r--r--sources/scala/tools/nsc/backend/icode/ICodes.scala4
-rw-r--r--sources/scala/tools/nsc/backend/jvm/GenJVM.scala1
3 files changed, 5 insertions, 4 deletions
diff --git a/sources/scala/tools/nsc/Global.scala b/sources/scala/tools/nsc/Global.scala
index 45a9ee2f99..75558c30b5 100644
--- a/sources/scala/tools/nsc/Global.scala
+++ b/sources/scala/tools/nsc/Global.scala
@@ -296,6 +296,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
phase = firstPhase;
definitions.init; // needs firstPhase and phase to be defined != NoPhase,
// that's why it is placed here.
+ icodes.init;
private var p: Phase = firstPhase;
private var stopped = false;
@@ -359,8 +360,6 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
/** A map from compiled top-level symbols to their picklers */
val symData = new HashMap[Symbol, PickleBuffer];
-
-
def compileSources(sources: List[SourceFile]): unit = {
val startTime = System.currentTimeMillis();
reporter.reset;
@@ -390,6 +389,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
if (settings.Xshowicode.value) writeICode();
if (reporter.errors == 0) {
+ assert(symData.isEmpty, symData.elements.toList);
/*
for (val Pair(sym, pickled) <- symData.elements.toList) {
sym setPos Position.NOPOS;
diff --git a/sources/scala/tools/nsc/backend/icode/ICodes.scala b/sources/scala/tools/nsc/backend/icode/ICodes.scala
index bcbd8f37d8..d29a8b5433 100644
--- a/sources/scala/tools/nsc/backend/icode/ICodes.scala
+++ b/sources/scala/tools/nsc/backend/icode/ICodes.scala
@@ -24,6 +24,8 @@ abstract class ICodes extends AnyRef
val global: Global;
/** The ICode representation of classes */
- var classes: List[IClass] = Nil;
+ var classes: List[IClass] = _;
+
+ def init = { classes = Nil }
}
diff --git a/sources/scala/tools/nsc/backend/jvm/GenJVM.scala b/sources/scala/tools/nsc/backend/jvm/GenJVM.scala
index ba86fada9b..50a86fdf27 100644
--- a/sources/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/sources/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -173,7 +173,6 @@ abstract class GenJVM extends SubComponent {
case Pair(VolatileAttr, _) => attributes = attributes | JAccessFlags.ACC_VOLATILE;
case _ => ();
}}
- //System.out.println("gen field " + f.symbol);//debug
jclass.addNewField(javaFlags(f.symbol) | attributes,
javaName(f.symbol),
javaType(toTypeKind(f.symbol.tpe)));