@@ -119,7 +119,7 @@ public Object formatArraySnippet(Word memory, DynamicHub hub, int length, boolea
119119 }
120120
121121 @ Snippet
122- public Object allocatePod (@ NonNullParameter DynamicHub hub , int sizeWithoutRefMap , byte [] referenceMap , @ ConstantParameter boolean emitMemoryBarrier , @ ConstantParameter boolean maybeUnroll ,
122+ public Object allocatePod (@ NonNullParameter DynamicHub hub , int arrayLength , byte [] referenceMap , @ ConstantParameter boolean emitMemoryBarrier , @ ConstantParameter boolean maybeUnroll ,
123123 @ ConstantParameter boolean supportsBulkZeroing , @ ConstantParameter boolean supportsOptimizedFilling , @ ConstantParameter AllocationProfilingData profilingData ) {
124124
125125 Word thread = getTLABInfo ();
@@ -128,45 +128,45 @@ public Object allocatePod(@NonNullParameter DynamicHub hub, int sizeWithoutRefMa
128128 ReplacementsUtil .dynamicAssert (end .subtract (top ).belowOrEqual (Integer .MAX_VALUE ), "TLAB is too large" );
129129
130130 int arrayBaseOffset = LayoutEncoding .getArrayBaseOffsetAsInt (hub .getLayoutEncoding ());
131- UnsignedWord allocationSize = arrayAllocationSize (sizeWithoutRefMap , arrayBaseOffset , 0 );
131+ UnsignedWord allocationSize = arrayAllocationSize (arrayLength , arrayBaseOffset , 0 );
132132 Word newTop = top .add (allocationSize );
133133
134134 Object instance ;
135135 if (useTLAB () && probability (FAST_PATH_PROBABILITY , shouldAllocateInTLAB (allocationSize , true )) && probability (FAST_PATH_PROBABILITY , newTop .belowOrEqual (end ))) {
136136 writeTlabTop (thread , newTop );
137137 emitPrefetchAllocate (newTop , true );
138- instance = formatPod (top , hub , sizeWithoutRefMap , referenceMap , false , false , afterArrayLengthOffset (),
138+ instance = formatPod (top , hub , arrayLength , referenceMap , false , false , afterArrayLengthOffset (),
139139 emitMemoryBarrier , maybeUnroll , supportsBulkZeroing , supportsOptimizedFilling , profilingData .snippetCounters );
140140 } else {
141141 profilingData .snippetCounters .stub .inc ();
142- instance = callSlowNewPodInstance (SLOW_NEW_POD_INSTANCE , encodeAsTLABObjectHeader (hub ), sizeWithoutRefMap , afterArrayLengthOffset (), referenceMap );
142+ instance = callSlowNewPodInstance (SLOW_NEW_POD_INSTANCE , encodeAsTLABObjectHeader (hub ), arrayLength , afterArrayLengthOffset (), referenceMap );
143143 }
144144 profileAllocation (profilingData , allocationSize );
145- return piArrayCastToSnippetReplaceeStamp (verifyOop (instance ), sizeWithoutRefMap );
145+ return piArrayCastToSnippetReplaceeStamp (verifyOop (instance ), arrayLength );
146146 }
147147
148148 @ Snippet
149- public Object formatPodSnippet (Word memory , DynamicHub hub , int sizeWithoutRefMap , byte [] referenceMap , boolean rememberedSet , boolean unaligned , int fillStartOffset , boolean emitMemoryBarrier ,
149+ public Object formatPodSnippet (Word memory , DynamicHub hub , int arrayLength , byte [] referenceMap , boolean rememberedSet , boolean unaligned , int fillStartOffset , boolean emitMemoryBarrier ,
150150 @ ConstantParameter boolean supportsBulkZeroing , @ ConstantParameter boolean supportsOptimizedFilling , @ ConstantParameter AllocationSnippetCounters snippetCounters ) {
151151
152152 DynamicHub hubNonNull = (DynamicHub ) PiNode .piCastNonNull (hub , SnippetAnchorNode .anchor ());
153153 byte [] refMapNonNull = (byte []) PiNode .piCastNonNull (referenceMap , SnippetAnchorNode .anchor ());
154- return formatPod (memory , hubNonNull , sizeWithoutRefMap , refMapNonNull , rememberedSet , unaligned , fillStartOffset ,
154+ return formatPod (memory , hubNonNull , arrayLength , refMapNonNull , rememberedSet , unaligned , fillStartOffset ,
155155 emitMemoryBarrier , false , supportsBulkZeroing , supportsOptimizedFilling , snippetCounters );
156156 }
157157
158- private Object formatPod (Word memory , DynamicHub hub , int sizeWithoutRefMap , byte [] referenceMap , boolean rememberedSet , boolean unaligned , int fillStartOffset ,
158+ private Object formatPod (Word memory , DynamicHub hub , int arrayLength , byte [] referenceMap , boolean rememberedSet , boolean unaligned , int fillStartOffset ,
159159 boolean emitMemoryBarrier , boolean maybeUnroll , boolean supportsBulkZeroing , boolean supportsOptimizedFilling , AllocationSnippetCounters snippetCounters ) {
160160
161161 int layoutEncoding = hub .getLayoutEncoding ();
162- UnsignedWord allocationSize = LayoutEncoding .getArraySize (layoutEncoding , sizeWithoutRefMap );
162+ UnsignedWord allocationSize = LayoutEncoding .getArraySize (layoutEncoding , arrayLength );
163163
164164 Word objectHeader = encodeAsObjectHeader (hub , rememberedSet , unaligned );
165- Object instance = formatArray (objectHeader , allocationSize , sizeWithoutRefMap , memory , FillContent .WITH_ZEROES , fillStartOffset ,
165+ Object instance = formatArray (objectHeader , allocationSize , arrayLength , memory , FillContent .WITH_ZEROES , fillStartOffset ,
166166 false , maybeUnroll , supportsBulkZeroing , supportsOptimizedFilling , snippetCounters );
167167
168168 int fromOffset = ConfigurationValues .getObjectLayout ().getArrayBaseOffset (JavaKind .Byte );
169- int toOffset = LayoutEncoding .getArrayBaseOffsetAsInt (layoutEncoding ) + sizeWithoutRefMap - referenceMap .length ;
169+ int toOffset = LayoutEncoding .getArrayBaseOffsetAsInt (layoutEncoding ) + arrayLength - referenceMap .length ;
170170 for (int i = 0 ; i < referenceMap .length ; i ++) {
171171 byte b = ObjectAccess .readByte (referenceMap , fromOffset + i , byteArrayIdentity ());
172172 ObjectAccess .writeByte (instance , toOffset + i , b , LocationIdentity .INIT_LOCATION );
@@ -315,10 +315,10 @@ public void lower(NewPodInstanceNode node, LoweringTool tool) {
315315
316316 Arguments args = new Arguments (allocatePod , graph .getGuardsStage (), tool .getLoweringStage ());
317317 args .add ("hub" , node .getHub ());
318- args .add ("sizeWithoutRefMap " , node .getSizeWithoutRefMap ());
318+ args .add ("arrayLength " , node .getArrayLength ());
319319 args .add ("referenceMap" , node .getReferenceMap ());
320320 args .addConst ("emitMemoryBarrier" , node .emitMemoryBarrier ());
321- args .addConst ("maybeUnroll" , node .getSizeWithoutRefMap ().isConstant ());
321+ args .addConst ("maybeUnroll" , node .getArrayLength ().isConstant ());
322322 args .addConst ("supportsBulkZeroing" , tool .getLowerer ().supportsBulkZeroing ());
323323 args .addConst ("supportsOptimizedFilling" , tool .getLowerer ().supportsOptimizedFilling (graph .getOptions ()));
324324 args .addConst ("profilingData" , getProfilingData (node , node .getKnownInstanceType ()));
@@ -337,7 +337,7 @@ public void lower(FormatPodNode node, LoweringTool tool) {
337337 Arguments args = new Arguments (formatPod , graph .getGuardsStage (), tool .getLoweringStage ());
338338 args .add ("memory" , node .getMemory ());
339339 args .add ("hub" , node .getHub ());
340- args .add ("sizeWithoutRefMap " , node .getSizeWithoutRefMap ());
340+ args .add ("arrayLength " , node .getArrayLength ());
341341 args .add ("referenceMap" , node .getReferenceMap ());
342342 args .add ("rememberedSet" , node .getRememberedSet ());
343343 args .add ("unaligned" , node .getUnaligned ());
0 commit comments