summaryrefslogtreecommitdiff
path: root/sources/scalac/Global.java
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-03-21 15:48:37 +0000
committerMartin Odersky <odersky@gmail.com>2003-03-21 15:48:37 +0000
commit787d4bb9dbc540a61632c1f234a54ab74a69609c (patch)
treeb09ef894e8f03e68f3defd96ad71c362741bf76c /sources/scalac/Global.java
parent54952ba17e2c99e3c842068b7b091ebbf4093921 (diff)
downloadscala-787d4bb9dbc540a61632c1f234a54ab74a69609c.tar.gz
scala-787d4bb9dbc540a61632c1f234a54ab74a69609c.tar.bz2
scala-787d4bb9dbc540a61632c1f234a54ab74a69609c.zip
*** empty log message ***
Diffstat (limited to 'sources/scalac/Global.java')
-rw-r--r--sources/scalac/Global.java18
1 files changed, 5 insertions, 13 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index c4ecc98a88..5c5b94ccc2 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -86,7 +86,7 @@ public class Global {
/** The set of currenttly compiled top-level symbols
*/
- public HashSet/*Symbol*/ compiledNow = new HashSet();
+ public HashMap/*<Symbol,Sourcefile>*/ compiledNow = new HashMap();
/** the current phase
*/
@@ -283,8 +283,10 @@ public class Global {
}
if (reporter.errors() != 0) {
imports.clear();
- for (Iterator it = compiledNow.iterator(); it.hasNext();) {
- uninitialize((Symbol)it.next());
+ for (Iterator it = compiledNow.keySet().iterator(); it.hasNext();) {
+ Symbol sym = (Symbol) it.next();
+ Sourcefile f = (Sourcefile) compiledNow.get(sym);
+ sym.reset(new SourceCompleter(this, f.filename));
}
}
compiledNow.clear();
@@ -629,14 +631,4 @@ public class Global {
reporter.inform("[" + message + " in " +
(System.currentTimeMillis() - start) + "ms]");
}
-
- private void uninitialize(Symbol sym) {
- if (sym instanceof ClassSymbol) {
- ClassSymbol clazz = (ClassSymbol)sym;
- if (clazz.sourcefile != null) {
- clazz.reset(
- new SourceCompleter(this, clazz.sourcefile));
- }
- }
- }
}