< prev index next >

src/java.base/share/classes/java/lang/invoke/VarHandles.java

Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd

*** 41,51 **** ? new VarHandleReferences.FlatValueFieldInstanceReadOnly(refc, foffset, type) : new VarHandleReferences.FlatValueFieldInstanceReadWrite(refc, foffset, type); } else { return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleReferences.FieldInstanceReadOnly(refc, foffset, type) ! : new VarHandleReferences.FieldInstanceReadWrite(refc, foffset, type, f.isValue()); } } else if (type == boolean.class) { return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleBooleans.FieldInstanceReadOnly(refc, foffset) --- 41,51 ---- ? new VarHandleReferences.FlatValueFieldInstanceReadOnly(refc, foffset, type) : new VarHandleReferences.FlatValueFieldInstanceReadWrite(refc, foffset, type); } else { return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleReferences.FieldInstanceReadOnly(refc, foffset, type) ! : new VarHandleReferences.FieldInstanceReadWrite(refc, foffset, type, f.isInlineableField()); } } else if (type == boolean.class) { return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleBooleans.FieldInstanceReadOnly(refc, foffset)
*** 104,114 **** long foffset = MethodHandleNatives.staticFieldOffset(f); if (!type.isPrimitive()) { assert(!f.isFlattened()); // static field is not flattened return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleReferences.FieldStaticReadOnly(base, foffset, type) ! : new VarHandleReferences.FieldStaticReadWrite(base, foffset, type, f.isValue()); } else if (type == boolean.class) { return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleBooleans.FieldStaticReadOnly(base, foffset) : new VarHandleBooleans.FieldStaticReadWrite(base, foffset); --- 104,114 ---- long foffset = MethodHandleNatives.staticFieldOffset(f); if (!type.isPrimitive()) { assert(!f.isFlattened()); // static field is not flattened return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleReferences.FieldStaticReadOnly(base, foffset, type) ! : new VarHandleReferences.FieldStaticReadWrite(base, foffset, type, f.isInlineableField()); } else if (type == boolean.class) { return f.isFinal() && !isWriteAllowedOnFinalFields ? new VarHandleBooleans.FieldStaticReadOnly(base, foffset) : new VarHandleBooleans.FieldStaticReadWrite(base, foffset);
*** 198,208 **** if (!componentType.isPrimitive()) { // the redundant componentType.isValue() check is there to // minimize the performance impact to non-value array. // It should be removed when Unsafe::isFlattenedArray is intrinsified. ! return componentType.isValue() && UNSAFE.isFlattenedArray(arrayClass) ? new VarHandleReferences.ValueArray(aoffset, ashift, arrayClass) : new VarHandleReferences.Array(aoffset, ashift, arrayClass); } else if (componentType == boolean.class) { return new VarHandleBooleans.Array(aoffset, ashift); --- 198,208 ---- if (!componentType.isPrimitive()) { // the redundant componentType.isValue() check is there to // minimize the performance impact to non-value array. // It should be removed when Unsafe::isFlattenedArray is intrinsified. ! return componentType.isInlineClass() && UNSAFE.isFlattenedArray(arrayClass) ? new VarHandleReferences.ValueArray(aoffset, ashift, arrayClass) : new VarHandleReferences.Array(aoffset, ashift, arrayClass); } else if (componentType == boolean.class) { return new VarHandleBooleans.Array(aoffset, ashift);
< prev index next >