Skip to content

Commit

Permalink
Move bipush and sipush fix from Opcode cleanup to this patch
Browse files Browse the repository at this point in the history
  • Loading branch information
liach committed Aug 29, 2024
1 parent 8c5e6fd commit 86c4104
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,14 @@ static IntrinsicConstantInstruction ofIntrinsic(Opcode op) {
/**
* {@return an argument constant instruction}
*
* @param op the opcode for the specific type of intrinsic constant instruction,
* which must be of kind {@link Opcode.Kind#CONSTANT}
* @param op the opcode for the specific type of argument constant instruction,
* which must be {@link Opcode#BIPUSH} or {@link Opcode#SIPUSH}
* @param value the constant value
* @throws IllegalArgumentException if the opcode is not {@link Opcode#BIPUSH}
* or {@link Opcode#SIPUSH}, or if the constant value is out of range
* for the opcode
*/
static ArgumentConstantInstruction ofArgument(Opcode op, int value) {
Util.checkKind(op, Opcode.Kind.CONSTANT);
if (op == Opcode.BIPUSH) {
BytecodeHelpers.validateBipush(value);
} else if (op == Opcode.SIPUSH) {
Expand Down

0 comments on commit 86c4104

Please sign in to comment.