Repository: dotnet/runtime
File: src/coreclr/vm/callstubgenerator.cpp (C++)

Code before:
        {
            ThrowHR(COR_E_BADIMAGEFORMAT);
        }
        sigBuilder.AppendData(sig.NumFixedArgs() - 1);
        TypeHandle thRetType = sig.GetRetTypeHandleThrowing();
#if defined(TARGET_WINDOWS)
        if (rewriteReturnTypeToForceRetBuf)
        {
            // Change the return type to type large enough it will always need to be returned via return buffer
            thRetType = CoreLibBinder::GetClass(CLASS__STACKFRAMEITERATOR);
            _ASSERTE(thRetType.IsValueType());
            _ASSERTE(thRetType.GetSize() > 64);
            sigBuilder.AppendElementType(ELEMENT_TYPE_INTERNAL);
            sigBuilder.AppendPointer(thRetType.AsPtr());
        }
        else
#endif
        {
            SigPointer pReturn = sig.GetReturnProps();
            pReturn.ConvertToInternalExactlyOne(sig.GetModule(), sig.GetSigTypeContext(), &sigBuilder);
        }

        // Skip the explicit this argument
        sig.NextArg();

    // Copy rest of the arguments
        sig.NextArg();
        SigPointer pArgs = sig.GetArgProps();
        for (unsigned i = 1; i < sig.NumFixedArgs(); i++)
        {
            pArgs.ConvertToInternalExactlyOne(sig.GetModule(), sig.GetSigTypeContext(), &sigBuilder);
        }

        DWORD cSig;
        PCCOR_SIGNATURE pNewSig = (PCCOR_SIGNATURE)sigBuilder.GetSignature(&cSig);
        MetaSig newSig(pNewSig, cSig, sig.GetModule(), NULL, MetaSig::sigMember);
        sig = newSig;
    }

    ArgIterator argIt(&sig);
    int32_t interpreterStackOffset = 0;

    m_currentRoutineType = RoutineType::None;
    m_r1 = NoRange; // indicates that there is no active range of general purpose registers
    m_r2 = 0;
    m_x1 = NoRange; // indicates that there is no active range of FP registers
    m_x2 = 0;
    m_s1 = NoRange; // indicates that there is no active range of stack arguments
    m_s2 = 0;
    m_routineIndex = 0;
    m_totalStackSize = argIt.SizeOfArgStack();

Review comment (suggestion):
Inconsistent indentation: the comment on line 2612 is not aligned with the code that follows. The comment should be at the same indentation level as the code block it describes.
```suggestion
        // Copy rest of the arguments
```

Code after:
#endif // LOG_COMPUTE_CALL_STUB
        sigBuilder.AppendByte(IMAGE_CEE_CS_CALLCONV_DEFAULT_HASTHIS);
        if ((sig.NumFixedArgs() == 0) || (sig.HasThis() && !sig.HasExplicitThis()))
        {
            ThrowHR(COR_E_BADIMAGEFORMAT);
        }
        sigBuilder.AppendData(sig.NumFixedArgs() - 1);
        TypeHandle thRetType = sig.GetRetTypeHandleThrowing();
#if defined(TARGET_WINDOWS)
        if (rewriteReturnTypeToForceRetBuf)
        {
            // Change the return type to type large enough it will always need to be returned via return buffer
            thRetType = CoreLibBinder::GetClass(CLASS__STACKFRAMEITERATOR);
            _ASSERTE(thRetType.IsValueType());
            _ASSERTE(thRetType.GetSize() > 64);
            sigBuilder.AppendElementType(ELEMENT_TYPE_INTERNAL);
            sigBuilder.AppendPointer(thRetType.AsPtr());
        }
        else
#endif
        {
            SigPointer pReturn = sig.GetReturnProps();
            pReturn.ConvertToInternalExactlyOne(sig.GetModule(), sig.GetSigTypeContext(), &sigBuilder);
        }

        // Skip the explicit this argument
        sig.NextArg();

        // Copy rest of the arguments
        sig.NextArg();
        SigPointer pArgs = sig.GetArgProps();
        for (unsigned i = 1; i < sig.NumFixedArgs(); i++)
        {
            pArgs.ConvertToInternalExactlyOne(sig.GetModule(), sig.GetSigTypeContext(), &sigBuilder);
        }

        DWORD cSig;
        PCCOR_SIGNATURE pNewSig = (PCCOR_SIGNATURE)sigBuilder.GetSignature(&cSig);
        MetaSig newSig(pNewSig, cSig, sig.GetModule(), NULL, MetaSig::sigMember);
        sig = newSig;
    }

    ArgIterator argIt(&sig);
    int32_t interpreterStackOffset = 0;

    m_currentRoutineType = RoutineType::None;
    m_r1 = NoRange; // indicates that there is no active range of general purpose registers
    m_r2 = 0;
    m_x1 = NoRange; // indicates that there is no active range of FP registers
    m_x2 = 0;
    m_s1 = NoRange; // indicates that there is no active range of stack arguments