mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8339115: Rename TypeKind enum constants to follow code style
Reviewed-by: asotona
This commit is contained in:
parent
fef1ef7dfe
commit
25e03b5209
38 changed files with 725 additions and 638 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -45,7 +45,9 @@ import jdk.internal.javac.PreviewFeature;
|
|||
public sealed interface ArrayLoadInstruction extends Instruction
|
||||
permits AbstractInstruction.UnboundArrayLoadInstruction {
|
||||
/**
|
||||
* {@return the component type of the array}
|
||||
* {@return the component type of the array} The {@link TypeKind#BYTE byte}
|
||||
* type load instruction {@link Opcode#BALOAD baload} also operates on
|
||||
* {@link TypeKind#BOOLEAN boolean} arrays.
|
||||
*/
|
||||
TypeKind typeKind();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -45,7 +45,9 @@ import jdk.internal.javac.PreviewFeature;
|
|||
public sealed interface ArrayStoreInstruction extends Instruction
|
||||
permits AbstractInstruction.UnboundArrayStoreInstruction {
|
||||
/**
|
||||
* {@return the component type of the array}
|
||||
* {@return the component type of the array} The {@link TypeKind#BYTE byte}
|
||||
* type store instruction {@link Opcode#BASTORE bastore} also operates on
|
||||
* {@link TypeKind#BOOLEAN boolean} arrays.
|
||||
*/
|
||||
TypeKind typeKind();
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public sealed interface NewPrimitiveArrayInstruction extends Instruction
|
|||
static NewPrimitiveArrayInstruction of(TypeKind typeKind) {
|
||||
// Implicit null-check:
|
||||
if (typeKind.newarrayCode() < 0) {
|
||||
throw new IllegalArgumentException("Illegal component type: " + typeKind.typeName());
|
||||
throw new IllegalArgumentException("Illegal component type for primitive array: " + typeKind.name());
|
||||
}
|
||||
return new AbstractInstruction.UnboundNewPrimitiveArrayInstruction(typeKind);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue