@Override public void visitLdcInsn(Object o) { simulatedStack.push(Boolean.FALSE); if (o instanceof Long || o instanceof Double) { simulatedStack.push(Boolean.FALSE); } if (copyEnabled) { super.visitLdcInsn(o); } }
@Override public void visitLdcInsn(Object o) { simulatedStack.push(Boolean.FALSE); if (o instanceof Long || o instanceof Double) { simulatedStack.push(Boolean.FALSE); } if (copyEnabled) { super.visitLdcInsn(o); } }
public void visitLdcInsn(Object cst) { if (cst instanceof Type) { reportError("no.class.literals", cst.toString()); } super.visitLdcInsn(cst); }
public void visitLdcInsn(Object cst) { if (include) { getAdaptee().visitLdcInsn(cst); } }
public void visitLdcInsn(Object cst) { if (cst instanceof Type) { String name = ((Type)cst).getInternalName(); if (name.equals(oldName)) { cst = Type.getType(newNameDesc); } } super.visitLdcInsn(cst); }
public void println(String msg) { super.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); super.visitLdcInsn(msg); super.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V"); }
public void push(int value) { if (value >= -1 && value <= 5) { super.visitInsn(ICONST_0 + value); } else if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE) { super.visitIntInsn(BIPUSH, value); } else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) { super.visitIntInsn(SIPUSH, value); } else { super.visitLdcInsn(Integer.valueOf(value)); } }
private int generateClinit(MethodVisitor mv) { Type clazz = Type.getType("L" + cname + ";"); // the client name (the BTrace script class name) mv.visitLdcInsn(runtime); // the name of the currently processed class mv.visitLdcInsn(clazz); // NOI18N // invocatio nof BTraceRuntime.retransform() method mv.visitMethodInsn(Opcodes.INVOKESTATIC, Type.getInternalName(BTraceRuntime.class), "retransform", "(Ljava/lang/String;Ljava/lang/Class;)V"); // NOI18N return clazz.getSize() + Type.getType(String.class).getSize(); } }