public void loadConstant(TypeDesc type) throws IllegalStateException { if (type == null) { loadNull(); return; } if (type.isPrimitive()) { if (mTarget < 0x00010001) { throw new IllegalStateException ("Loading constant primitive classes not supported below target version 1.1"); } loadStaticField(type.toObjectType(), "TYPE", TypeDesc.forClass(Class.class)); } else { if (mTarget < 0x00010005) { throw new IllegalStateException ("Loading constant object classes not supported below target version 1.5"); } ConstantInfo info = mCp.addConstantClass(type); mInstructions.new LoadConstantInstruction(1, TypeDesc.forClass(Class.class), info); } }
mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info); return; mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info); return; mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info);
public void loadConstant(TypeDesc type) throws IllegalStateException { if (type == null) { loadNull(); return; } if (type.isPrimitive()) { if (mTarget < 0x00010001) { throw new IllegalStateException ("Loading constant primitive classes not supported below target version 1.1"); } loadStaticField(type.toObjectType(), "TYPE", TypeDesc.forClass(Class.class)); } else { if (mTarget < 0x00010005) { throw new IllegalStateException ("Loading constant object classes not supported below target version 1.5"); } ConstantInfo info = mCp.addConstantClass(type); mInstructions.new LoadConstantInstruction(1, TypeDesc.forClass(Class.class), info); } }
mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info); return; mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info); return; mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info);
} else { ConstantInfo info = mCp.addConstantInteger(value); mInstructions.new LoadConstantInstruction(1, TypeDesc.INT, info);
public void loadConstant(double value) { if (value == 0) { addInstruction(2, TypeDesc.DOUBLE, Opcode.DCONST_0); } else if (value == 1) { addInstruction(2, TypeDesc.DOUBLE, Opcode.DCONST_1); } else { ConstantInfo info = mCp.addConstantDouble(value); mInstructions.new LoadConstantInstruction(2, TypeDesc.DOUBLE, info, true); } }
public void loadConstant(long value) { if (value == 0) { addInstruction(2, TypeDesc.LONG, Opcode.LCONST_0); } else if (value == 1) { addInstruction(2, TypeDesc.LONG, Opcode.LCONST_1); } else { ConstantInfo info = mCp.addConstantLong(value); mInstructions.new LoadConstantInstruction(2, TypeDesc.LONG, info, true); } }
public void loadConstant(float value) { if (value == 0) { addInstruction(1, TypeDesc.FLOAT, Opcode.FCONST_0); } else if (value == 1) { addInstruction(1, TypeDesc.FLOAT, Opcode.FCONST_1); } else if (value == 2) { addInstruction(1, TypeDesc.FLOAT, Opcode.FCONST_2); } else { ConstantInfo info = mCp.addConstantFloat(value); mInstructions.new LoadConstantInstruction(1, TypeDesc.FLOAT, info); } }
} else { ConstantInfo info = mCp.addConstantInteger(value); mInstructions.new LoadConstantInstruction(1, TypeDesc.INT, info);
public void loadConstant(double value) { if (value == 0) { addInstruction(2, TypeDesc.DOUBLE, Opcode.DCONST_0); } else if (value == 1) { addInstruction(2, TypeDesc.DOUBLE, Opcode.DCONST_1); } else { ConstantInfo info = mCp.addConstantDouble(value); mInstructions.new LoadConstantInstruction(2, TypeDesc.DOUBLE, info, true); } }
public void loadConstant(float value) { if (value == 0) { addInstruction(1, TypeDesc.FLOAT, Opcode.FCONST_0); } else if (value == 1) { addInstruction(1, TypeDesc.FLOAT, Opcode.FCONST_1); } else if (value == 2) { addInstruction(1, TypeDesc.FLOAT, Opcode.FCONST_2); } else { ConstantInfo info = mCp.addConstantFloat(value); mInstructions.new LoadConstantInstruction(1, TypeDesc.FLOAT, info); } }
public void loadConstant(long value) { if (value == 0) { addInstruction(2, TypeDesc.LONG, Opcode.LCONST_0); } else if (value == 1) { addInstruction(2, TypeDesc.LONG, Opcode.LCONST_1); } else { ConstantInfo info = mCp.addConstantLong(value); mInstructions.new LoadConstantInstruction(2, TypeDesc.LONG, info, true); } }