package org.jruby.compiler.impl;
import static org.jruby.util.CodegenUtils.*;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Attribute;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Handle;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.util.Printer;
import org.objectweb.asm.util.Textifier;
import org.objectweb.asm.util.TraceMethodVisitor;
setMethodVisitor(cv.visitMethod(flags, name, signature, something, exceptions));
this.start = new Label();
Short-hand for specifying a set of aloads
- Parameters:
args
list of aloads you want
public void aload(int arg0) {
public void iload(int arg0) {
public void lload(int arg0) {
public void fload(int arg0) {
public void dload(int arg0) {
public void astore(int arg0) {
public void istore(int arg0) {
public void lstore(int arg0) {
public void fstore(int arg0) {
public void dstore(int arg0) {
public void label(Label label) {
public void trycatch(Label arg0, Label arg1, Label arg2,
Label before = new Label();
Label after = new Label();
Label catchStart = new Label();
Label done = new Label();
trycatch(before, after, catchStart, type);
public void go_to(Label arg0) {
public void lookupswitch(Label arg0, int[] arg1, Label[] arg2) {
public void ifeq(Label arg0) {
public void ifne(Label arg0) {
public void iftrue(Label arg0) {
String className = "(unknown class)";
if (cv instanceof ClassWriter) {
className = new ClassReader(((ClassWriter)cv).toByteArray()).getClassName();
pw.write("*** Dumping " + className + "." + name + " ***\n");
pw.write("*** Dumping ***\n");
method.visitLocalVariable(name, type.getDescriptor(), null, start, end, index);
public void line(int line) {
Label label = new Label();
public void line(int line, Label label) {
public void ifnull(Label arg0) {
public void iflt(Label arg0) {
public void ifle(Label arg0) {
public void ifgt(Label arg0) {
public void ifge(Label arg0) {
public void iinc(int arg0, int arg1) {
public void jsr(Label branch) {
public void ret(int arg0) {
Label arg3, Label arg4, int arg5) {
pw.write("*** Dumping ***\n");
public void tableswitch(int min, int max, Label defaultLabel, Label[] cases) {