diff options
author | paltherr <paltherr@epfl.ch> | 2004-03-09 16:40:09 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-03-09 16:40:09 +0000 |
commit | 07c291484e749b7c9ee64ccaf45860bab62e3e65 (patch) | |
tree | 3307afa64e85e54ba0492c71003d2b00116d61b2 /sources/scalac/symtab/classfile/PackageParser.java | |
parent | 829ff49f1cff21b98e2b9cd55ea5c5d3c7d4b4b3 (diff) | |
download | scala-07c291484e749b7c9ee64ccaf45860bab62e3e65.tar.gz scala-07c291484e749b7c9ee64ccaf45860bab62e3e65.tar.bz2 scala-07c291484e749b7c9ee64ccaf45860bab62e3e65.zip |
- Replaced MetadataParser superclass by SymbolL...
- Replaced MetadataParser superclass by SymbolLoader Removed usage
- of staticsParsers (no more needed with SymbolLoader) Simplified
- Analyzer.lateEnter (code no more needed with SymbolLoader) Moved some
- code from SourceCompleter into Analyzer.loadMixinCode Simplified
- parsers (code no more needed with SymbolLoader)
Diffstat (limited to 'sources/scalac/symtab/classfile/PackageParser.java')
-rw-r--r-- | sources/scalac/symtab/classfile/PackageParser.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sources/scalac/symtab/classfile/PackageParser.java b/sources/scalac/symtab/classfile/PackageParser.java index c3f4879af0..00e4ae1da9 100644 --- a/sources/scalac/symtab/classfile/PackageParser.java +++ b/sources/scalac/symtab/classfile/PackageParser.java @@ -15,7 +15,7 @@ import scalac.util.*; import java.io.*; import java.util.HashMap; -public class PackageParser extends MetadataParser { +public class PackageParser extends SymbolLoader { /** the class parser */ @@ -36,8 +36,7 @@ public class PackageParser extends MetadataParser { /** complete package type symbol p by loading all package members */ - protected void doComplete(Symbol p) { - long msec = System.currentTimeMillis(); + protected String doComplete(Symbol p) { Scope members = new Scope(); String dirname = null; HashMap/*<Symbol, AbstractFile>*/ symFile = new HashMap(); @@ -53,10 +52,7 @@ public class PackageParser extends MetadataParser { if (global.target == global.TARGET_MSIL) importer.importCLRTypes(p, members, this); p.setInfo(Type.compoundType(Type.EMPTY_ARRAY, members, p)); - if (dirname == null) - dirname = "anonymous package"; - global.operation("scanned " + dirname + " in " + - (System.currentTimeMillis() - msec) + "ms"); + return dirname == null ? "anonymous package" : "package '"+dirname+"'"; } private boolean isMostRecent(AbstractFile f, Symbol previous, HashMap symFile) { @@ -95,10 +91,8 @@ public class PackageParser extends MetadataParser { if (isMostRecent(f, locals.lookup(n), symFile)) { ClassSymbol clazz = new ClassSymbol(n, p, classCompletion); // todo: needed? - clazz.allConstructors().setInfo( - classCompletion.staticsParser(clazz)); - clazz.module().setInfo( - classCompletion.staticsParser(clazz)); + clazz.allConstructors().setInfo(classCompletion); + clazz.module().setInfo(classCompletion); // enter class locals.enter(clazz); // enter module |