-
Enhancement
-
Resolution: Fixed
-
P5
-
None
-
None
-
None
Both the implementations of [jdk.internal.foreign.abi.Architecture] are singletons but do not have a privat constructor and is not final. This means a default constructor is generated:
public jdk.internal.foreign.abi.x64.X86_64Architecture();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
Declaring the class final and introduce a private constructor would save 5 byte byte code and might potentially unlock other optimisations.
public jdk.internal.foreign.abi.x64.X86_64Architecture();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
Declaring the class final and introduce a private constructor would save 5 byte byte code and might potentially unlock other optimisations.