@@ -2417,7 +2417,7 @@ private void EmitObjectCreationExpression(BoundObjectCreationExpression expressi
24172417}
24182418
24192419// ReadOnlySpan may just refer to the blob, if possible.
2420- if ( TryEmitReadonlySpanAsBlobWrapper ( expression , used , inPlaceTarget : null , out _ ) )
2420+ if ( TryEmitOptimizedReadonlySpan ( expression , used , inPlaceTarget : null , out _ ) )
24212421{
24222422return ;
24232423}
@@ -2436,15 +2436,15 @@ private void EmitObjectCreationExpression(BoundObjectCreationExpression expressi
24362436}
24372437}
24382438
2439- private bool TryEmitReadonlySpanAsBlobWrapper ( BoundObjectCreationExpression expression , bool used , BoundExpression inPlaceTarget , out bool avoidInPlace )
2439+ private bool TryEmitOptimizedReadonlySpan ( BoundObjectCreationExpression expression , bool used , BoundExpression inPlaceTarget , out bool avoidInPlace )
24402440{
24412441int argumentsLength = expression . Arguments . Length ;
24422442avoidInPlace = false ;
24432443return ( ( argumentsLength == 1 &&
24442444expression . Constructor . OriginalDefinition == ( object ) this . _module . Compilation . GetWellKnownTypeMember ( WellKnownMember . System_ReadOnlySpan_T__ctor_Array ) ) ||
24452445( argumentsLength == 3 &&
24462446expression . Constructor . OriginalDefinition == ( object ) this . _module . Compilation . GetWellKnownTypeMember ( WellKnownMember . System_ReadOnlySpan_T__ctor_Array_Start_Length ) ) ) &&
2447- TryEmitReadonlySpanAsBlobWrapper ( ( NamedTypeSymbol ) expression . Type , expression . Arguments [ 0 ] , used , inPlaceTarget , out avoidInPlace ,
2447+ TryEmitOptimizedReadonlySpanCreation ( ( NamedTypeSymbol ) expression . Type , expression . Arguments [ 0 ] , used , inPlaceTarget , out avoidInPlace ,
24482448start : argumentsLength == 3 ? expression . Arguments [ 1 ] : null ,
24492449length : argumentsLength == 3 ? expression . Arguments [ 2 ] : null ) ;
24502450}
@@ -2666,7 +2666,7 @@ private bool TryInPlaceCtorCall(BoundExpression target, BoundObjectCreationExpre
26662666Debug . Assert ( TargetIsNotOnHeap ( target ) , "in-place construction target should not be on heap" ) ;
26672667
26682668// ReadOnlySpan may just refer to the blob, if possible.
2669- if ( TryEmitReadonlySpanAsBlobWrapper ( objCreation , used , target , out bool avoidInPlace ) )
2669+ if ( TryEmitOptimizedReadonlySpan ( objCreation , used , target , out bool avoidInPlace ) )
26702670{
26712671return true ;
26722672}