Methods Summary |
---|
public static Insn | aLoad(int i, ConstantPool pool)Return the best instruction for loading a reference from a local
variable slot
if (i == 0)
return Insn.create(opc_aload_0);
else if (i == 1)
return Insn.create(opc_aload_1);
else if (i == 2)
return Insn.create(opc_aload_2);
else if (i == 3)
return Insn.create(opc_aload_3);
return Insn.create(opc_aload, i);
|
public static Insn | aStore(int i, ConstantPool pool)Return the best instruction for storing a reference to a local
variable slot
if (i == 0)
return Insn.create(opc_astore_0);
else if (i == 1)
return Insn.create(opc_astore_1);
else if (i == 2)
return Insn.create(opc_astore_2);
else if (i == 3)
return Insn.create(opc_astore_3);
return Insn.create(opc_astore, i);
|
public static Insn | dLoad(int i, ConstantPool pool)Return the best instruction for loading a double from a local
variable slot
if (i == 0)
return Insn.create(opc_dload_0);
else if (i == 1)
return Insn.create(opc_dload_1);
else if (i == 2)
return Insn.create(opc_dload_2);
else if (i == 3)
return Insn.create(opc_dload_3);
return Insn.create(opc_dload, i);
|
public static Insn | dStore(int i, ConstantPool pool)Return the best instruction for storing a double to a local
variable slot
if (i == 0)
return Insn.create(opc_dstore_0);
else if (i == 1)
return Insn.create(opc_dstore_1);
else if (i == 2)
return Insn.create(opc_dstore_2);
else if (i == 3)
return Insn.create(opc_dstore_3);
return Insn.create(opc_dstore, i);
|
public static Insn | doubleConstant(double d, ConstantPool pool)Return the best instruction for loading the specified double constant onto
the stack.
if (d == 0)
return Insn.create(opc_dconst_0);
else if (d == 1)
return Insn.create(opc_dconst_1);
else
return Insn.create(opc_ldc2_w, pool.addDouble(d));
|
public static Insn | fLoad(int i, ConstantPool pool)Return the best instruction for loading a float from a local
variable slot
if (i == 0)
return Insn.create(opc_fload_0);
else if (i == 1)
return Insn.create(opc_fload_1);
else if (i == 2)
return Insn.create(opc_fload_2);
else if (i == 3)
return Insn.create(opc_fload_3);
return Insn.create(opc_fload, i);
|
public static Insn | fStore(int i, ConstantPool pool)Return the best instruction for storing a float to a local
variable slot
if (i == 0)
return Insn.create(opc_fstore_0);
else if (i == 1)
return Insn.create(opc_fstore_1);
else if (i == 2)
return Insn.create(opc_fstore_2);
else if (i == 3)
return Insn.create(opc_fstore_3);
return Insn.create(opc_fstore, i);
|
public static Insn | floatConstant(float f, ConstantPool pool)Return the best instruction for loading the specified float constant onto
the stack.
if (f == 0)
return Insn.create(opc_fconst_0);
else if (f == 1)
return Insn.create(opc_fconst_1);
else if (f == 2)
return Insn.create(opc_fconst_2);
else
return Insn.create(opc_ldc, pool.addFloat(f));
|
public static Insn | iLoad(int i, ConstantPool pool)Return the best instruction for loading an int from a local
variable slot
if (i == 0)
return Insn.create(opc_iload_0);
else if (i == 1)
return Insn.create(opc_iload_1);
else if (i == 2)
return Insn.create(opc_iload_2);
else if (i == 3)
return Insn.create(opc_iload_3);
return Insn.create(opc_iload, i);
|
public static Insn | iStore(int i, ConstantPool pool)Return the best instruction for storing an int to a local
variable slot
if (i == 0)
return Insn.create(opc_istore_0);
else if (i == 1)
return Insn.create(opc_istore_1);
else if (i == 2)
return Insn.create(opc_istore_2);
else if (i == 3)
return Insn.create(opc_istore_3);
return Insn.create(opc_istore, i);
|
public static Insn | integerConstant(int i, ConstantPool pool)Return the best instruction for loading the specified integer
constant onto the stack - hopefully use short form
if (i == 0)
return Insn.create(opc_iconst_0);
else if (i == 1)
return Insn.create(opc_iconst_1);
else if (i == 2)
return Insn.create(opc_iconst_2);
else if (i == 3)
return Insn.create(opc_iconst_3);
else if (i == 4)
return Insn.create(opc_iconst_4);
else if (i == 5)
return Insn.create(opc_iconst_5);
else if (i >= -128 && i < 128)
return Insn.create(opc_bipush, i);
return Insn.create(opc_ldc, pool.addInteger(i));
|
public static Insn | lLoad(int i, ConstantPool pool)Return the best instruction for loading a long from a local
variable slot
if (i == 0)
return Insn.create(opc_lload_0);
else if (i == 1)
return Insn.create(opc_lload_1);
else if (i == 2)
return Insn.create(opc_lload_2);
else if (i == 3)
return Insn.create(opc_lload_3);
return Insn.create(opc_lload, i);
|
public static Insn | lStore(int i, ConstantPool pool)Return the best instruction for storing a long to a local
variable slot
if (i == 0)
return Insn.create(opc_lstore_0);
else if (i == 1)
return Insn.create(opc_lstore_1);
else if (i == 2)
return Insn.create(opc_lstore_2);
else if (i == 3)
return Insn.create(opc_lstore_3);
return Insn.create(opc_lstore, i);
|
public static Insn | load(int tp, int i, ConstantPool pool)Return the best instruction for loading a value from a local
variable slot
switch(tp) {
//@olsen: added these cases:
case T_BOOLEAN:
case T_CHAR:
case T_BYTE:
case T_SHORT:
//@olsen: end added cases
case T_INT:
return iLoad(i, pool);
case T_FLOAT:
return fLoad(i, pool);
case T_DOUBLE:
return dLoad(i, pool);
case T_LONG:
return lLoad(i, pool);
case TC_OBJECT:
return aLoad(i, pool);
default:
throw new InsnError("bad load type");//NOI18N
}
|
public static Insn | longConstant(long l, ConstantPool pool)Return the best instruction for loading the specified long constant onto
the stack.
if (l == 0)
return Insn.create(opc_lconst_0);
else if (l == 1)
return Insn.create(opc_lconst_1);
else
return Insn.create(opc_ldc2_w, pool.addLong(l));
|
public static Insn | store(int tp, int i, ConstantPool pool)Return the best instruction for storing a value to a local
variable slot
switch(tp) {
//@olsen: added these cases:
case T_BOOLEAN:
case T_CHAR:
case T_BYTE:
case T_SHORT:
//@olsen: end added cases
case T_INT:
return iStore(i, pool);
case T_FLOAT:
return fStore(i, pool);
case T_DOUBLE:
return dStore(i, pool);
case T_LONG:
return lStore(i, pool);
case TC_OBJECT:
return aStore(i, pool);
default:
throw new InsnError("bad store type");//NOI18N
}
|