diff options
author | paltherr <paltherr@epfl.ch> | 2004-03-13 17:39:57 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-03-13 17:39:57 +0000 |
commit | 417033fd0a33af000b95623f1c3d0f9e90fbf6ff (patch) | |
tree | 429018088aa48df0f06f5bbe875277dab60ac790 /sources/scalac/symtab/classfile | |
parent | f893e29c2f7a6fb00210d76933ac94e86d924aa6 (diff) | |
download | scala-417033fd0a33af000b95623f1c3d0f9e90fbf6ff.tar.gz scala-417033fd0a33af000b95623f1c3d0f9e90fbf6ff.tar.bz2 scala-417033fd0a33af000b95623f1c3d0f9e90fbf6ff.zip |
- Replaced byte array in Name by a string
Diffstat (limited to 'sources/scalac/symtab/classfile')
-rw-r--r-- | sources/scalac/symtab/classfile/ClassfileParser.java | 3 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/ConstantPool.java | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/Pickle.java | 7 |
3 files changed, 7 insertions, 5 deletions
diff --git a/sources/scalac/symtab/classfile/ClassfileParser.java b/sources/scalac/symtab/classfile/ClassfileParser.java index bdb76e7b71..5f3f2f8a57 100644 --- a/sources/scalac/symtab/classfile/ClassfileParser.java +++ b/sources/scalac/symtab/classfile/ClassfileParser.java @@ -177,7 +177,8 @@ public class ClassfileParser implements ClassfileConstants { */ protected Type readType(int i) { Name sig = pool.readExternal(i); - return sigs.sigToType(Name.names, sig.index, sig.length()); + byte[] ascii = SourceRepresentation.string2ascii(sig.toString()); + return sigs.sigToType(ascii, 0, ascii.length); } /** read a field diff --git a/sources/scalac/symtab/classfile/ConstantPool.java b/sources/scalac/symtab/classfile/ConstantPool.java index 6cd21b32c6..8d80446342 100644 --- a/sources/scalac/symtab/classfile/ConstantPool.java +++ b/sources/scalac/symtab/classfile/ConstantPool.java @@ -79,7 +79,7 @@ public class ConstantPool implements ClassfileConstants { */ protected Object classOrType(Name name) { if ((name.charAt(0) == '[') || (name.charAt(name.length() - 1) == ';')) { - byte[] ascii = name.toAscii(); + byte[] ascii = SourceRepresentation.string2ascii(name.toString()); return sigparser.sigToType(ascii, 0, ascii.length); } else return name; diff --git a/sources/scalac/symtab/classfile/Pickle.java b/sources/scalac/symtab/classfile/Pickle.java index 0303666514..1e355faca9 100644 --- a/sources/scalac/symtab/classfile/Pickle.java +++ b/sources/scalac/symtab/classfile/Pickle.java @@ -304,10 +304,11 @@ public class Pickle implements Kinds, Modifiers, EntryTags { private void writeName(Name name) { writeByte(name.isTermName() ? TERMname : TYPEname); writeByte(0); // space for length - while (bp + name.length() > bytes.length) resizeTo(bytes.length * 2); - name.copyAscii(bytes, bp); + byte[] ascii = SourceRepresentation.string2ascii(name.toString()); + while (bp + ascii.length > bytes.length) resizeTo(bytes.length * 2); + System.arraycopy(ascii, 0, bytes, bp, ascii.length); if (debug) System.out.print(name); - bp = bp + name.length(); + bp = bp + ascii.length; } /** Write a symbol entry. |