public CorElementType GetReturnType(out TypeHandle thValueType) { thValueType = _returnType; CorElementType returnValue = thValueType.GetCorElementType(); if (!thValueType.IsValueType()) { thValueType = default(TypeHandle); } return returnValue; }
// Note that this overload does not handle varargs private static bool IsArgPassedByRef(TypeHandle th) { // LIMITED_METHOD_CONTRACT; Debug.Assert(!th.IsNull()); // This method only works for valuetypes. It includes true value types, // primitives, enums and TypedReference. Debug.Assert(th.IsValueType()); uint size = th.GetSize(); #if _TARGET_AMD64_ return IsArgPassedByRef((int)size); #elif _TARGET_ARM64_ // Composites greater than 16 bytes are passed by reference return ((size > ArchitectureConstants.ENREGISTERED_PARAMTYPE_MAXSIZE) && !th.IsHFA()); #else #error ArgIterator::IsArgPassedByRef #endif }
// Argument iteration. public CorElementType GetArgumentType(int argNum, out TypeHandle thValueType) { thValueType = _parameterTypes[argNum]; CorElementType returnValue = thValueType.GetCorElementType(); if (!thValueType.IsValueType()) { thValueType = default(TypeHandle); } return returnValue; }