On Thu, 26 May 2022 23:42:27 GMT, liach <d...@openjdk.java.net> wrote:

>> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace 
>> the hash map with a simple lookup, similar to what's done in 
>> [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242)
>
> liach has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   Make primitive type info more reader friendly

src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 979:

> 977:             unwrapMethodDesc = "()" + baseTypeString;
> 978:             this.loadOpcode = loadOpcode;
> 979:             this.returnOpcode = loadOpcode - ILOAD + IRETURN;

This could do it.  It would be more explicit to take the return opcode as an 
argument to the constructor.

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

PR: https://git.openjdk.java.net/jdk/pull/8801

Reply via email to