[lworld] RFR: 8231500: [lworld] Merge the experimental bytecode API

Mandy Chung mchung at openjdk.java.net
Tue Dec 1 18:29:12 UTC 2020


On Wed, 25 Nov 2020 11:58:55 GMT, David Simms <dsimms at openjdk.org> wrote:

> * Moved to a single bytecode testing API
> * Cleaned out vbytecodes
> * Cleanup of tests not actually using the API
> * Removed TestNativeClone's API usage since cooking the method handle could no
> longer bypass the verifier's bad access check

Looks okay in general.   For the new methods like `isValue`, `valueType` and `putValueClass` etc, they should be renamed to reflect the new terminology (inline class).

test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java line 271:

> 269: 
> 270:             @Override
> 271:             public boolean isValue(String desc) {

I think we should rename `isValue` to `isInlineClass` and also other new `xxxValue` methods

test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java line 171:

> 169:     }
> 170: 
> 171:     public static MethodHandle loadCode(MethodHandles.Lookup lookup, String className, String methodName, MethodType type, Consumer<? super MethodHandleCodeBuilder<?>> builder) {

Are these two `loadCode` methods taking a builder `Consumer` used by the tests?

If so, the following classes and methods can be made private to hide them as internals.

test/jdk/lib/testlibrary/bytecode/jdk/experimental/bytecode/BasicTypeHelper.java line 49:

> 47: 
> 48:     @Override
> 49:     public boolean isValue(String t) {

s/isValue/isInlineClass/

test/jdk/lib/testlibrary/bytecode/jdk/experimental/bytecode/BasicTypeHelper.java line 59:

> 57: 
> 58:     @Override
> 59:     public String valueType(String s) {

s/valueType/inlineType/

test/jdk/lib/testlibrary/bytecode/jdk/experimental/bytecode/BytePoolHelper.java line 341:

> 339: 
> 340:     @Override
> 341:     public int putValueClass(S symbol) {

s/putValueClass/putInlineClass/

-------------

PR: https://git.openjdk.java.net/valhalla/pull/279



More information about the valhalla-dev mailing list