mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode
Reviewed-by: briangoetz
This commit is contained in:
parent
def257727d
commit
97c180892b
17 changed files with 48 additions and 0 deletions
|
@ -68,6 +68,8 @@ public sealed interface DiscontinuedInstruction extends Instruction {
|
|||
* @param op the opcode for the specific type of JSR instruction,
|
||||
* which must be of kind {@link Opcode.Kind#DISCONTINUED_JSR}
|
||||
* @param target target label of the subroutine
|
||||
* @throws IllegalArgumentException if the opcode kind is not
|
||||
* {@link Opcode.Kind#DISCONTINUED_JSR}.
|
||||
*/
|
||||
static JsrInstruction of(Opcode op, Label target) {
|
||||
Util.checkKind(op, Opcode.Kind.DISCONTINUED_JSR);
|
||||
|
@ -109,6 +111,8 @@ public sealed interface DiscontinuedInstruction extends Instruction {
|
|||
* @param op the opcode for the specific type of RET instruction,
|
||||
* which must be of kind {@link Opcode.Kind#DISCONTINUED_RET}
|
||||
* @param slot the local variable slot to load return address from
|
||||
* @throws IllegalArgumentException if the opcode kind is not
|
||||
* {@link Opcode.Kind#DISCONTINUED_RET}.
|
||||
*/
|
||||
static RetInstruction of(Opcode op, int slot) {
|
||||
Util.checkKind(op, Opcode.Kind.DISCONTINUED_RET);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue