From d5bca9b88cae1cc7c359eb1786b34d587ad5170b Mon Sep 17 00:00:00 2001 From: paltherr Date: Sun, 29 Feb 2004 14:07:12 +0000 Subject: [PATCH] - Removed method SymbolTablePrinter.getSymbolFullName - Removed method SymbolTablePrinter.printSymbolFullName - Replaced method SymbolTablePrinter.printSymbol by method SymbolTablePrinter.printSymbolKindAndName git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@2673 5e8d7ff9-d8ef-0310-90f0-a4852d11357a --- sources/scalac/Global.java | 8 ----- sources/scalac/symtab/Symbol.java | 2 +- sources/scalac/symtab/SymbolTablePrinter.java | 34 ++++++------------- sources/scalac/transformer/Erasure.java | 2 +- test/files/neg/S7.check | 2 +- test/files/neg/bug228.check | 2 +- test/files/neg/bug72.check | 2 +- test/files/neg/bug97.check | 2 +- 8 files changed, 16 insertions(+), 38 deletions(-) diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java index 26b64a906..280858163 100644 --- a/sources/scalac/Global.java +++ b/sources/scalac/Global.java @@ -515,14 +515,6 @@ public abstract class Global { } return string; } - public String getSymbolFullName(Symbol symbol) { - String string = super.getSymbolFullName(symbol); - if (!debug) { - int index = string.indexOf('$'); - if (index > 0) string = string.substring(0, index); - } - return string; - } } // !!! >>> Interpreter stuff diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 76fa156a1..6ef26bf19 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -1110,7 +1110,7 @@ public abstract class Symbol implements Modifiers, Kinds { * e.g., "class Foo", "function Bar". */ public String toString() { - return new SymbolTablePrinter().printSymbol(this).toString(); + return new SymbolTablePrinter().printSymbolKindAndName(this).toString(); } /** String representation of location. diff --git a/sources/scalac/symtab/SymbolTablePrinter.java b/sources/scalac/symtab/SymbolTablePrinter.java index 340962666..cefccc771 100644 --- a/sources/scalac/symtab/SymbolTablePrinter.java +++ b/sources/scalac/symtab/SymbolTablePrinter.java @@ -303,13 +303,6 @@ public class SymbolTablePrinter { return name; } - /** Returns the full name of the given symbol. */ - public String getSymbolFullName(Symbol symbol) { - String name = symbol.fullName().toString(); - if (!global.debug) name = NameTransformer.decode(name); - return name; - } - /** Returns the inner string of the given symbol. */ public String getSymbolInnerString(Symbol symbol) { switch (symbol.kind) { @@ -335,11 +328,16 @@ public class SymbolTablePrinter { return printSymbolUniqueId(symbol); } - /** Prints the full name of the given symbol */ - public SymbolTablePrinter printSymbolFullName(Symbol symbol) { - print(getSymbolFullName(symbol)); - //print("{" + symbol.owner() + "}");//DEBUG - return printSymbolUniqueId(symbol); + /** Prints the kind and the name of the given symbol. */ + public SymbolTablePrinter printSymbolKindAndName(Symbol symbol) { + if (symbol.isAnonymousClass()) { + print("