@@ -184,7 +184,7 @@ public final class DynamicHub implements AnnotatedElement, java.lang.reflect.Typ
184
184
* The returned category does not necessarily match the {@link LayoutEncoding}, see
185
185
* {@link Hybrid} objects for more details.
186
186
*/
187
- private final int hubType ;
187
+ private final byte hubType ;
188
188
189
189
/**
190
190
* Used to quickly determine if this class is a subclass of {@link Reference}.
@@ -455,7 +455,7 @@ public final class DynamicHub implements AnnotatedElement, java.lang.reflect.Typ
455
455
private ReflectionMetadata reflectionMetadata ;
456
456
457
457
@ Platforms (Platform .HOSTED_ONLY .class )
458
- public DynamicHub (Class <?> hostedJavaClass , String name , int hubType , ReferenceType referenceType , DynamicHub superType ,
458
+ public DynamicHub (Class <?> hostedJavaClass , String name , byte hubType , ReferenceType referenceType , DynamicHub superType ,
459
459
DynamicHub componentHub , String sourceFileName , int modifiers , short flags , ClassLoader classLoader ,
460
460
Class <?> nestHost , String simpleBinaryName , Object declaringClass , String signature , int layerId ) {
461
461
this .hostedJavaClass = hostedJavaClass ;
@@ -503,7 +503,7 @@ public static DynamicHub allocate(String name, DynamicHub superHub, DynamicHub c
503
503
504
504
ReferenceType referenceType = ReferenceType .computeReferenceType (DynamicHub .toClass (superHub ));
505
505
// GR-59683: HubType.OBJECT_ARRAY?
506
- int hubTybe = referenceType == ReferenceType .None ? HubType .INSTANCE : HubType .REFERENCE_INSTANCE ;
506
+ byte hubType = ( byte ) (( referenceType == ReferenceType .None ) ? HubType .INSTANCE : HubType .REFERENCE_INSTANCE ) ;
507
507
508
508
DynamicHubCompanion companion = new DynamicHubCompanion (classLoader );
509
509
/* Always allow unsafe allocation for classes that were loaded at run-time. */
@@ -555,7 +555,7 @@ public static DynamicHub allocate(String name, DynamicHub superHub, DynamicHub c
555
555
DynamicHubOffsets dynamicHubOffsets = DynamicHubOffsets .singleton ();
556
556
/* Write fields in defining order. */
557
557
writeObject (hub , dynamicHubOffsets .getNameOffset (), name );
558
- writeInt (hub , dynamicHubOffsets .getHubTypeOffset (), hubTybe );
558
+ writeByte (hub , dynamicHubOffsets .getHubTypeOffset (), hubType );
559
559
writeByte (hub , dynamicHubOffsets .getReferenceTypeOffset (), referenceType .getValue ());
560
560
561
561
writeInt (hub , dynamicHubOffsets .getLayoutEncodingOffset (), layoutEncoding );
0 commit comments