mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8339131
: Remove rarely-used accessor methods from Opcode
Reviewed-by: asotona
This commit is contained in:
parent
e25a9e7fd8
commit
bd8569bc6c
8 changed files with 392 additions and 280 deletions
|
@ -75,7 +75,7 @@ public sealed interface ConstantInstruction extends Instruction {
|
|||
*/
|
||||
@Override
|
||||
default TypeKind typeKind() {
|
||||
return opcode().primaryTypeKind();
|
||||
return BytecodeHelpers.intrinsicConstantType(opcode());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ public sealed interface ConstantInstruction extends Instruction {
|
|||
*/
|
||||
@Override
|
||||
default TypeKind typeKind() {
|
||||
return opcode().primaryTypeKind();
|
||||
return TypeKind.INT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ public sealed interface ConstantInstruction extends Instruction {
|
|||
*/
|
||||
static IntrinsicConstantInstruction ofIntrinsic(Opcode op) {
|
||||
Util.checkKind(op, Opcode.Kind.CONSTANT);
|
||||
if (op.constantValue() == null)
|
||||
if (op.sizeIfFixed() != 1)
|
||||
throw new IllegalArgumentException(String.format("Wrong opcode specified; found %s, expected xCONST_val", op));
|
||||
return new AbstractInstruction.UnboundIntrinsicConstantInstruction(op);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue