|
|
|
@ -853,9 +853,19 @@ public class CodeArray implements InstructionVisitor, Opcode { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
stackHeight += 2; |
|
|
|
|
|
|
|
|
|
} else if (operand instanceof String) { |
|
|
|
|
final int index = constants.addConstant(Constant.STRING, operand); |
|
|
|
|
int index = constants.addConstant(Constant.STRING, operand); |
|
|
|
|
createLDC(index); |
|
|
|
|
} else if (operand instanceof Type) { |
|
|
|
|
// JDK5+ class literal
|
|
|
|
|
int index = constants.addConstant(Constant.CLASS, operand); |
|
|
|
|
createLDC(index); |
|
|
|
|
} else { |
|
|
|
|
throw new RuntimeException(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createLDC(int index) { |
|
|
|
|
|
|
|
|
|
if (index < 256) { |
|
|
|
|
addOpcode(Opcode.opc_ldc); |
|
|
|
@ -866,9 +876,6 @@ public class CodeArray implements InstructionVisitor, Opcode { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
stackHeight++; |
|
|
|
|
} else { |
|
|
|
|
throw new RuntimeException(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|