8339115: Rename TypeKind enum constants to follow code style

Reviewed-by: asotona
This commit is contained in:
Chen Liang 2024-08-30 17:28:28 +00:00
parent fef1ef7dfe
commit 25e03b5209
38 changed files with 725 additions and 638 deletions

View file

@ -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();

View file

@ -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();

View file

@ -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);
}