summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab/classfile/SymblParser.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-03-09 16:40:09 +0000
committerpaltherr <paltherr@epfl.ch>2004-03-09 16:40:09 +0000
commit07c291484e749b7c9ee64ccaf45860bab62e3e65 (patch)
tree3307afa64e85e54ba0492c71003d2b00116d61b2 /sources/scalac/symtab/classfile/SymblParser.java
parent829ff49f1cff21b98e2b9cd55ea5c5d3c7d4b4b3 (diff)
downloadscala-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/SymblParser.java')
-rw-r--r--sources/scalac/symtab/classfile/SymblParser.java30
1 files changed, 5 insertions, 25 deletions
diff --git a/sources/scalac/symtab/classfile/SymblParser.java b/sources/scalac/symtab/classfile/SymblParser.java
index e5db5ee61c..108e7b3af6 100644
--- a/sources/scalac/symtab/classfile/SymblParser.java
+++ b/sources/scalac/symtab/classfile/SymblParser.java
@@ -22,30 +22,10 @@ public class SymblParser extends ClassParser {
/** complete class symbol c by loading the class
*/
- public void doComplete(Symbol c) {
- //System.out.println("loading " + c);//DEBUG
- try {
- long msec = System.currentTimeMillis();
- String filename = SourceRepresentation.externalizeFileName(
- c, ".symbl");
- AbstractFile f = global.classPath.openFile(filename);
- if (f == null)
- global.error("could not read class " + c);
- else {
- byte[] data = f.read();
- new UnPickle(c, data, Name.fromString(filename));
- global.operation("loaded " + f.getPath() + " in " +
- (System.currentTimeMillis() - msec) + "ms");
- /*
- if (!global.separate)
- new SourceCompleter(global).complete(c);//for now
- */
- }
- } catch (IOException e) {
- if (global.debug) e.printStackTrace();
- global.error("i/o error while loading " + c);
- c.setInfo(Type.ErrorType);
- }
+ public String doComplete(Symbol clasz) throws IOException {
+ AbstractFile file = global.classPath.openFile(
+ SourceRepresentation.externalizeFileName(clasz, ".symbl"));
+ new UnPickle(clasz, file.read(), Name.fromString(file.getPath()));
+ return "symbol file '" + file.getPath() + "'";
}
}
-