提交 f344c5d7 编写于 作者: K ksrini

8061830: [asm] refresh internal ASM version v5.0.3

Reviewed-by: psandoz, sundar
上级 ba6b9da6
...@@ -1858,7 +1858,7 @@ public class ClassReader { ...@@ -1858,7 +1858,7 @@ public class ClassReader {
break; break;
case 'B': // pointer to CONSTANT_Byte case 'B': // pointer to CONSTANT_Byte
av.visit(name, av.visit(name,
new Byte((byte) readInt(items[readUnsignedShort(v)]))); (byte) readInt(items[readUnsignedShort(v)]));
v += 2; v += 2;
break; break;
case 'Z': // pointer to CONSTANT_Boolean case 'Z': // pointer to CONSTANT_Boolean
...@@ -1868,13 +1868,13 @@ public class ClassReader { ...@@ -1868,13 +1868,13 @@ public class ClassReader {
v += 2; v += 2;
break; break;
case 'S': // pointer to CONSTANT_Short case 'S': // pointer to CONSTANT_Short
av.visit(name, new Short( av.visit(name,
(short) readInt(items[readUnsignedShort(v)]))); (short) readInt(items[readUnsignedShort(v)]));
v += 2; v += 2;
break; break;
case 'C': // pointer to CONSTANT_Char case 'C': // pointer to CONSTANT_Char
av.visit(name, new Character( av.visit(name,
(char) readInt(items[readUnsignedShort(v)]))); (char) readInt(items[readUnsignedShort(v)]));
v += 2; v += 2;
break; break;
case 's': // pointer to CONSTANT_Utf8 case 's': // pointer to CONSTANT_Utf8
...@@ -2498,13 +2498,13 @@ public class ClassReader { ...@@ -2498,13 +2498,13 @@ public class ClassReader {
int index = items[item]; int index = items[item];
switch (b[index - 1]) { switch (b[index - 1]) {
case ClassWriter.INT: case ClassWriter.INT:
return new Integer(readInt(index)); return readInt(index);
case ClassWriter.FLOAT: case ClassWriter.FLOAT:
return new Float(Float.intBitsToFloat(readInt(index))); return Float.intBitsToFloat(readInt(index));
case ClassWriter.LONG: case ClassWriter.LONG:
return new Long(readLong(index)); return readLong(index);
case ClassWriter.DOUBLE: case ClassWriter.DOUBLE:
return new Double(Double.longBitsToDouble(readLong(index))); return Double.longBitsToDouble(readLong(index));
case ClassWriter.CLASS: case ClassWriter.CLASS:
return Type.getObjectType(readUTF8(index, buf)); return Type.getObjectType(readUTF8(index, buf));
case ClassWriter.STR: case ClassWriter.STR:
......
...@@ -181,6 +181,9 @@ public class TypePath { ...@@ -181,6 +181,9 @@ public class TypePath {
typeArg = typeArg * 10 + c - '0'; typeArg = typeArg * 10 + c - '0';
i += 1; i += 1;
} }
if (i < n && typePath.charAt(i) == ';') {
i += 1;
}
out.put11(TYPE_ARGUMENT, typeArg); out.put11(TYPE_ARGUMENT, typeArg);
} }
} }
...@@ -193,7 +196,7 @@ public class TypePath { ...@@ -193,7 +196,7 @@ public class TypePath {
* ARRAY_ELEMENT} steps are represented with '[', {@link #INNER_TYPE * ARRAY_ELEMENT} steps are represented with '[', {@link #INNER_TYPE
* INNER_TYPE} steps with '.', {@link #WILDCARD_BOUND WILDCARD_BOUND} steps * INNER_TYPE} steps with '.', {@link #WILDCARD_BOUND WILDCARD_BOUND} steps
* with '*' and {@link #TYPE_ARGUMENT TYPE_ARGUMENT} steps with their type * with '*' and {@link #TYPE_ARGUMENT TYPE_ARGUMENT} steps with their type
* argument index in decimal form. * argument index in decimal form followed by ';'.
*/ */
@Override @Override
public String toString() { public String toString() {
...@@ -211,7 +214,7 @@ public class TypePath { ...@@ -211,7 +214,7 @@ public class TypePath {
result.append('*'); result.append('*');
break; break;
case TYPE_ARGUMENT: case TYPE_ARGUMENT:
result.append(getStepArgument(i)); result.append(getStepArgument(i)).append(';');
break; break;
default: default:
result.append('_'); result.append('_');
......
...@@ -408,7 +408,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -408,7 +408,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
} else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) { } else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) {
mv.visitIntInsn(Opcodes.SIPUSH, value); mv.visitIntInsn(Opcodes.SIPUSH, value);
} else { } else {
mv.visitLdcInsn(new Integer(value)); mv.visitLdcInsn(value);
} }
} }
...@@ -422,7 +422,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -422,7 +422,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
if (value == 0L || value == 1L) { if (value == 0L || value == 1L) {
mv.visitInsn(Opcodes.LCONST_0 + (int) value); mv.visitInsn(Opcodes.LCONST_0 + (int) value);
} else { } else {
mv.visitLdcInsn(new Long(value)); mv.visitLdcInsn(value);
} }
} }
...@@ -437,7 +437,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -437,7 +437,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2 if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2
mv.visitInsn(Opcodes.FCONST_0 + (int) value); mv.visitInsn(Opcodes.FCONST_0 + (int) value);
} else { } else {
mv.visitLdcInsn(new Float(value)); mv.visitLdcInsn(value);
} }
} }
...@@ -452,7 +452,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -452,7 +452,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d
mv.visitInsn(Opcodes.DCONST_0 + (int) value); mv.visitInsn(Opcodes.DCONST_0 + (int) value);
} else { } else {
mv.visitLdcInsn(new Double(value)); mv.visitLdcInsn(value);
} }
} }
...@@ -1647,11 +1647,13 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -1647,11 +1647,13 @@ public class GeneratorAdapter extends LocalVariablesSorter {
*/ */
public void catchException(final Label start, final Label end, public void catchException(final Label start, final Label end,
final Type exception) { final Type exception) {
Label doCatch = new Label();
if (exception == null) { if (exception == null) {
mv.visitTryCatchBlock(start, end, mark(), null); mv.visitTryCatchBlock(start, end, doCatch, null);
} else { } else {
mv.visitTryCatchBlock(start, end, mark(), mv.visitTryCatchBlock(start, end, doCatch,
exception.getInternalName()); exception.getInternalName());
} }
mark(doCatch);
} }
} }
...@@ -737,7 +737,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -737,7 +737,7 @@ public class InstructionAdapter extends MethodVisitor {
} else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) { } else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) {
mv.visitIntInsn(Opcodes.SIPUSH, cst); mv.visitIntInsn(Opcodes.SIPUSH, cst);
} else { } else {
mv.visitLdcInsn(new Integer(cst)); mv.visitLdcInsn(cst);
} }
} }
...@@ -745,7 +745,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -745,7 +745,7 @@ public class InstructionAdapter extends MethodVisitor {
if (cst == 0L || cst == 1L) { if (cst == 0L || cst == 1L) {
mv.visitInsn(Opcodes.LCONST_0 + (int) cst); mv.visitInsn(Opcodes.LCONST_0 + (int) cst);
} else { } else {
mv.visitLdcInsn(new Long(cst)); mv.visitLdcInsn(cst);
} }
} }
...@@ -754,7 +754,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -754,7 +754,7 @@ public class InstructionAdapter extends MethodVisitor {
if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2 if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2
mv.visitInsn(Opcodes.FCONST_0 + (int) cst); mv.visitInsn(Opcodes.FCONST_0 + (int) cst);
} else { } else {
mv.visitLdcInsn(new Float(cst)); mv.visitLdcInsn(cst);
} }
} }
...@@ -763,7 +763,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -763,7 +763,7 @@ public class InstructionAdapter extends MethodVisitor {
if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d
mv.visitInsn(Opcodes.DCONST_0 + (int) cst); mv.visitInsn(Opcodes.DCONST_0 + (int) cst);
} else { } else {
mv.visitLdcInsn(new Double(cst)); mv.visitLdcInsn(cst);
} }
} }
......
...@@ -366,8 +366,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { ...@@ -366,8 +366,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
protected void addSVUID(long svuid) { protected void addSVUID(long svuid) {
FieldVisitor fv = super.visitField(Opcodes.ACC_FINAL FieldVisitor fv = super.visitField(Opcodes.ACC_FINAL
+ Opcodes.ACC_STATIC, "serialVersionUID", "J", null, new Long( + Opcodes.ACC_STATIC, "serialVersionUID", "J", null, svuid);
svuid));
if (fv != null) { if (fv != null) {
fv.visitEnd(); fv.visitEnd();
} }
......
...@@ -247,11 +247,13 @@ public class AnnotationNode extends AnnotationVisitor { ...@@ -247,11 +247,13 @@ public class AnnotationNode extends AnnotationVisitor {
an.accept(av.visitAnnotation(name, an.desc)); an.accept(av.visitAnnotation(name, an.desc));
} else if (value instanceof List) { } else if (value instanceof List) {
AnnotationVisitor v = av.visitArray(name); AnnotationVisitor v = av.visitArray(name);
List<?> array = (List<?>) value; if (v != null) {
for (int j = 0; j < array.size(); ++j) { List<?> array = (List<?>) value;
accept(v, null, array.get(j)); for (int j = 0; j < array.size(); ++j) {
accept(v, null, array.get(j));
}
v.visitEnd();
} }
v.visitEnd();
} else { } else {
av.visit(name, value); av.visit(name, value);
} }
......
...@@ -110,7 +110,7 @@ public class LookupSwitchInsnNode extends AbstractInsnNode { ...@@ -110,7 +110,7 @@ public class LookupSwitchInsnNode extends AbstractInsnNode {
: labels.length); : labels.length);
if (keys != null) { if (keys != null) {
for (int i = 0; i < keys.length; ++i) { for (int i = 0; i < keys.length; ++i) {
this.keys.add(new Integer(keys[i])); this.keys.add(keys[i]);
} }
} }
if (labels != null) { if (labels != null) {
......
...@@ -160,6 +160,7 @@ public class MethodInsnNode extends AbstractInsnNode { ...@@ -160,6 +160,7 @@ public class MethodInsnNode extends AbstractInsnNode {
@Override @Override
public void accept(final MethodVisitor mv) { public void accept(final MethodVisitor mv) {
mv.visitMethodInsn(opcode, owner, name, desc, itf); mv.visitMethodInsn(opcode, owner, name, desc, itf);
acceptAnnotations(mv);
} }
@Override @Override
......
...@@ -802,7 +802,7 @@ public class CheckMethodAdapter extends MethodVisitor { ...@@ -802,7 +802,7 @@ public class CheckMethodAdapter extends MethodVisitor {
if (labels.get(label) != null) { if (labels.get(label) != null) {
throw new IllegalArgumentException("Already visited label"); throw new IllegalArgumentException("Already visited label");
} }
labels.put(label, new Integer(insnCount)); labels.put(label, insnCount);
super.visitLabel(label); super.visitLabel(label);
} }
......
...@@ -732,7 +732,7 @@ public class Textifier extends Printer { ...@@ -732,7 +732,7 @@ public class Textifier extends Printer {
Textifier t = createTextifier(); Textifier t = createTextifier();
text.add(t.getText()); text.add(t.getText());
text.add(visible ? ") // parameter " : ") // invisible, parameter "); text.add(visible ? ") // parameter " : ") // invisible, parameter ");
text.add(new Integer(parameter)); text.add(parameter);
text.add("\n"); text.add("\n");
return t; return t;
} }
......
Path: . Path: .
Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-06-19 Working Copy Root Path: /hudson/jobs/objectweb-init/workspace/asm-svn-2014-10-15
URL: file:///svnroot/asm/trunk/asm URL: file:///svnroot/asm/trunk/asm
Repository Root: file:///svnroot/asm Repository Root: file:///svnroot/asm
Repository UUID: 271bd773-ee82-43a6-9b2b-1890ed8ce7f9 Repository UUID: 271bd773-ee82-43a6-9b2b-1890ed8ce7f9
Revision: 1750 Revision: 1772
Node Kind: directory Node Kind: directory
Schedule: normal Schedule: normal
Last Changed Author: forax Last Changed Author: ebruneton
Last Changed Rev: 1750 Last Changed Rev: 1772
Last Changed Date: 2014-06-06 00:31:02 +0200 (Fri, 06 Jun 2014) Last Changed Date: 2014-09-06 09:13:07 +0200 (Sat, 06 Sep 2014)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册