Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/coreclr/inc/corinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,10 @@ enum CorInfoType
CORINFO_TYPE_NATIVEUINT = 0xd,
CORINFO_TYPE_FLOAT = 0xe,
CORINFO_TYPE_DOUBLE = 0xf,
CORINFO_TYPE_STRING = 0x10, // Not used, should remove
CORINFO_TYPE_CLASS = 0x10,
CORINFO_TYPE_PTR = 0x11,
CORINFO_TYPE_BYREF = 0x12,
Comment thread
jkotas marked this conversation as resolved.
Outdated
CORINFO_TYPE_VALUECLASS = 0x13,
CORINFO_TYPE_CLASS = 0x14,
CORINFO_TYPE_REFANY = 0x15,
CORINFO_TYPE_VALUECLASS = 0x15,
Comment thread
jkotas marked this conversation as resolved.
Outdated

// CORINFO_TYPE_VAR is for a generic type variable.
// Generic type variables only appear when the JIT is doing
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

#include <minipal/guid.h>

constexpr GUID JITEEVersionIdentifier = { /* bf284efa-a3fb-4420-a62f-6e1a0a1b2cfc */
0xbf284efa,
0xa3fb,
0x4420,
{0xa6, 0x2f, 0x6e, 0x1a, 0x0a, 0x1b, 0x2c, 0xfc}
constexpr GUID JITEEVersionIdentifier = { /* 082b767f-4d87-484f-92d0-8f8160961e6a */
0x082b767f,
0x4d87,
0x484f,
{0x92, 0xd0, 0x8f, 0x81, 0x60, 0x96, 0x1e, 0x6a}
};

#endif // JIT_EE_VERSIONING_GUID_H
6 changes: 0 additions & 6 deletions src/coreclr/interpreter/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2348,15 +2348,13 @@ static InterpType GetInterpType(CorInfoType corInfoType)
return InterpTypeR4;
case CORINFO_TYPE_DOUBLE:
return InterpTypeR8;
case CORINFO_TYPE_STRING:
case CORINFO_TYPE_CLASS:
return InterpTypeO;
case CORINFO_TYPE_PTR:
return InterpTypeI;
case CORINFO_TYPE_BYREF:
return InterpTypeByRef;
case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
return InterpTypeVT;
case CORINFO_TYPE_VOID:
return InterpTypeVoid;
Expand Down Expand Up @@ -6151,7 +6149,6 @@ void InterpCompiler::EmitSuspend(const CORINFO_CALL_INFO &callInfo, Continuation
suspendData->asyncMethodReturnType = m_methodInfo->args.retTypeClass;
suspendData->asyncMethodReturnTypePrimitiveSize = 0;
Comment thread
jkotas marked this conversation as resolved.
Comment thread
jkotas marked this conversation as resolved.
Comment thread
jkotas marked this conversation as resolved.
break;
case CORINFO_TYPE_STRING:
case CORINFO_TYPE_CLASS:
suspendData->asyncMethodReturnType = m_compHnd->getBuiltinClass(CLASSID_SYSTEM_OBJECT);
suspendData->asyncMethodReturnTypePrimitiveSize = 0;
Expand Down Expand Up @@ -6199,9 +6196,6 @@ void InterpCompiler::EmitSuspend(const CORINFO_CALL_INFO &callInfo, Continuation
case CORINFO_TYPE_PTR:
suspendData->asyncMethodReturnTypePrimitiveSize = sizeof(void*);
break;
case CORINFO_TYPE_REFANY:
BADCODE("TypedReference return types not supported for async methods");
break;

case CORINFO_TYPE_VAR:
BADCODE("VAR return types should have been translated before we get here on async methods");
Comment thread
jkotas marked this conversation as resolved.
Outdated
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/interpreter/naming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,9 @@ void AppendMethodName(COMP_HANDLE comp,
CorInfoType type = strip(withMod);
switch (type)
{
case CORINFO_TYPE_STRING:
case CORINFO_TYPE_CLASS:
case CORINFO_TYPE_VAR:
case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
{
CORINFO_CLASS_HANDLE clsHnd = comp->getArgClass(sig, argLst);
// For some SIMD struct types we can get a nullptr back from eeGetArgClass on Linux/X64
Expand Down Expand Up @@ -243,11 +241,9 @@ void AppendMethodName(COMP_HANDLE comp,
printer->Add(':');
switch (retType)
{
case CORINFO_TYPE_STRING:
case CORINFO_TYPE_CLASS:
case CORINFO_TYPE_VAR:
case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
{
CORINFO_CLASS_HANDLE clsHnd = sig->retTypeClass;
if (clsHnd != NO_CLASS_HANDLE)
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1725,10 +1725,6 @@ unsigned Compiler::compGetTypeSize(CorInfoType cit, CORINFO_CLASS_HANDLE clsHnd)
{
sigSize = info.compCompHnd->getClassSize(clsHnd);
}
else if (cit == CORINFO_TYPE_REFANY)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JIT handles TypedReference as a regular byref-like type. We do not need to special case it in the CORINFO_TYPE_... enum.

{
sigSize = 2 * TARGET_POINTER_SIZE;
}
return sigSize;
}

Expand Down
3 changes: 0 additions & 3 deletions src/coreclr/jit/ee_il_dll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,6 @@ unsigned Compiler::eeGetArgSize(CorInfoType corInfoType, CORINFO_CLASS_HANDLE ty
isHfa = (hfaType != TYP_UNDEF);
unsigned structSize = info.compCompHnd->getClassSize(typeHnd);

// make certain the EE passes us back the right thing for refanys
assert(corInfoType != CORINFO_TYPE_REFANY || structSize == 2 * TARGET_POINTER_SIZE);

// For each target that supports passing struct args in multiple registers
// apply the target specific rules for them here:

Expand Down
18 changes: 8 additions & 10 deletions src/coreclr/jit/ee_il_dll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ inline var_types JITtype2varType(CorInfoType type)
TYP_I_IMPL, // CORINFO_TYPE_NATIVEUINT = 0xd,
TYP_FLOAT, // CORINFO_TYPE_FLOAT = 0xe,
TYP_DOUBLE, // CORINFO_TYPE_DOUBLE = 0xf,
TYP_REF, // CORINFO_TYPE_STRING = 0x10, // Not used, should remove
TYP_REF, // CORINFO_TYPE_CLASS = 0x10,
TYP_I_IMPL, // CORINFO_TYPE_PTR = 0x11,
TYP_BYREF, // CORINFO_TYPE_BYREF = 0x12,
TYP_STRUCT, // CORINFO_TYPE_VALUECLASS = 0x13,
TYP_REF, // CORINFO_TYPE_CLASS = 0x14,
TYP_STRUCT, // CORINFO_TYPE_REFANY = 0x15,
TYP_UNDEF, // unused 0x13,
TYP_UNDEF, // unused 0x14,
TYP_STRUCT, // CORINFO_TYPE_VALUECLASS = 0x15,

// Generic type variables only appear when we're doing
// verification of generic code, in which case we're running
Expand All @@ -244,7 +244,6 @@ inline var_types JITtype2varType(CorInfoType type)
assert(varTypeMap[CORINFO_TYPE_DOUBLE] == TYP_DOUBLE);
assert(varTypeMap[CORINFO_TYPE_VOID] == TYP_VOID);
assert(varTypeMap[CORINFO_TYPE_VALUECLASS] == TYP_STRUCT);
assert(varTypeMap[CORINFO_TYPE_REFANY] == TYP_STRUCT);

assert(type < CORINFO_TYPE_COUNT);
assert(varTypeMap[type] != TYP_UNDEF);
Expand Down Expand Up @@ -274,12 +273,12 @@ inline var_types JitType2PreciseVarType(CorInfoType type)
TYP_U_IMPL, // CORINFO_TYPE_NATIVEUINT = 0xd,
TYP_FLOAT, // CORINFO_TYPE_FLOAT = 0xe,
TYP_DOUBLE, // CORINFO_TYPE_DOUBLE = 0xf,
TYP_REF, // CORINFO_TYPE_STRING = 0x10, // Not used, should remove
TYP_REF, // CORINFO_TYPE_CLASS = 0x10,
TYP_U_IMPL, // CORINFO_TYPE_PTR = 0x11,
TYP_BYREF, // CORINFO_TYPE_BYREF = 0x12,
TYP_STRUCT, // CORINFO_TYPE_VALUECLASS = 0x13,
TYP_REF, // CORINFO_TYPE_CLASS = 0x14,
TYP_STRUCT, // CORINFO_TYPE_REFANY = 0x15,
TYP_UNDEF, // unused 0x13,
TYP_UNDEF, // unused 0x14,
TYP_STRUCT, // CORINFO_TYPE_VALUECLASS = 0x15,

// Generic type variables only appear when we're doing
// verification of generic code, in which case we're running
Expand All @@ -305,7 +304,6 @@ inline var_types JitType2PreciseVarType(CorInfoType type)
assert(preciseVarTypeMap[CORINFO_TYPE_DOUBLE] == TYP_DOUBLE);
assert(preciseVarTypeMap[CORINFO_TYPE_VOID] == TYP_VOID);
assert(preciseVarTypeMap[CORINFO_TYPE_VALUECLASS] == TYP_STRUCT);
assert(preciseVarTypeMap[CORINFO_TYPE_REFANY] == TYP_STRUCT);

assert(type < CORINFO_TYPE_COUNT);
assert(preciseVarTypeMap[type] != TYP_UNDEF);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2631,7 +2631,7 @@ bool Compiler::checkTailCallConstraint(OPCODE opcode,
// Disallow the tailcall for this kind.
CORINFO_CLASS_HANDLE classHandle;
CorInfoType ciType = strip(info.compCompHnd->getArgType(&sig, args, &classHandle));
if ((ciType == CORINFO_TYPE_PTR) || (ciType == CORINFO_TYPE_BYREF) || (ciType == CORINFO_TYPE_REFANY))
if ((ciType == CORINFO_TYPE_PTR) || (ciType == CORINFO_TYPE_BYREF))
{
return false;
}
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/jit/lclvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,7 @@ void Compiler::lvaInitVarDsc(LclVarDsc* varDsc,
case CORINFO_TYPE_PTR:
case CORINFO_TYPE_BYREF:
case CORINFO_TYPE_CLASS:
case CORINFO_TYPE_STRING:
case CORINFO_TYPE_VAR:
case CORINFO_TYPE_REFANY:
varDsc->lvIsPtr = 1;
break;
Comment thread
jkotas marked this conversation as resolved.
Comment thread
jkotas marked this conversation as resolved.
Comment thread
jkotas marked this conversation as resolved.
default:
Expand Down
6 changes: 2 additions & 4 deletions src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,10 @@ public enum CorInfoType
CORINFO_TYPE_NATIVEUINT = 0xd,
CORINFO_TYPE_FLOAT = 0xe,
CORINFO_TYPE_DOUBLE = 0xf,
CORINFO_TYPE_STRING = 0x10, // Not used, should remove
CORINFO_TYPE_CLASS = 0x10,
CORINFO_TYPE_PTR = 0x11,
CORINFO_TYPE_BYREF = 0x12,
CORINFO_TYPE_VALUECLASS = 0x13,
CORINFO_TYPE_CLASS = 0x14,
CORINFO_TYPE_REFANY = 0x15,
CORINFO_TYPE_VALUECLASS = 0x15,

// CORINFO_TYPE_VAR is for a generic type variable.
// Generic type variables only appear when the JIT is doing
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/tools/superpmi/mcs/verbildump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ void DumpPrimToConsoleBare(MethodContext* mc, CorInfoType prim, DWORDLONG classH
case CORINFO_TYPE_DOUBLE:
printf("float64");
return;
// case CORINFO_TYPE_STRING: printf("string"); return;
case CORINFO_TYPE_PTR:
printf("ptr");
return;
Expand Down Expand Up @@ -95,9 +94,6 @@ void DumpPrimToConsoleBare(MethodContext* mc, CorInfoType prim, DWORDLONG classH

return;
}
Comment thread
jkotas marked this conversation as resolved.
case CORINFO_TYPE_REFANY:
printf("refany");
return;
case CORINFO_TYPE_VAR:
printf("var");
return;
Expand Down
10 changes: 2 additions & 8 deletions src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,18 +576,14 @@ const char* toString(CorInfoType cit)
return "float";
case CORINFO_TYPE_DOUBLE:
return "double";
case CORINFO_TYPE_STRING:
return "string";
case CORINFO_TYPE_CLASS:
return "class";
case CORINFO_TYPE_PTR:
return "ptr";
case CORINFO_TYPE_BYREF:
return "byref";
case CORINFO_TYPE_VALUECLASS:
return "valueclass";
case CORINFO_TYPE_CLASS:
return "class";
case CORINFO_TYPE_REFANY:
return "refany";
case CORINFO_TYPE_VAR:
return "var";
default:
Expand Down Expand Up @@ -641,9 +637,7 @@ unsigned int toCorInfoSize(CorInfoType cit)
case CORINFO_TYPE_CLASS:
return (int)SpmiTargetPointerSize();

case CORINFO_TYPE_STRING:
case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
case CORINFO_TYPE_UNDEF:
case CORINFO_TYPE_VOID:
default:
Expand Down
11 changes: 3 additions & 8 deletions src/coreclr/tools/superpmi/superpmi-shared/typeutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ const char* TypeUtils::GetCorInfoTypeName(CorInfoType type)
return "byref";

case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
return "struct";

case CORINFO_TYPE_STRING:
case CORINFO_TYPE_CLASS:
case CORINFO_TYPE_VAR:
return "ref";
Expand Down Expand Up @@ -90,13 +88,12 @@ bool TypeUtils::IsFloatingPoint(CorInfoType type)

bool TypeUtils::IsPointer(CorInfoType type)
{
return (type == CORINFO_TYPE_STRING || type == CORINFO_TYPE_PTR || type == CORINFO_TYPE_BYREF ||
type == CORINFO_TYPE_CLASS);
return (type == CORINFO_TYPE_CLASS || type == CORINFO_TYPE_PTR || type == CORINFO_TYPE_BYREF);
}

bool TypeUtils::IsValueClass(CorInfoType type)
{
return (type == CORINFO_TYPE_VALUECLASS || type == CORINFO_TYPE_REFANY);
return (type == CORINFO_TYPE_VALUECLASS);
}

// Determines if a value class, represented by the given class handle, is required to be passed
Expand Down Expand Up @@ -144,15 +141,13 @@ size_t TypeUtils::SizeOfCorInfoType(CorInfoType type)

case CORINFO_TYPE_NATIVEINT:
case CORINFO_TYPE_NATIVEUINT:
case CORINFO_TYPE_STRING:
case CORINFO_TYPE_CLASS:
case CORINFO_TYPE_PTR:
case CORINFO_TYPE_BYREF:
case CORINFO_TYPE_CLASS:
return SpmiTargetPointerSize();

// This should be obtained via repGetClassSize
case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
LogException(EXCEPTIONCODE_TYPEUTILS,
"SizeOfCorInfoType does not support value types; use repGetClassSize instead (type: 0x%x)",
type);
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ CorInfoType CEEInfo::asCorInfoType(CorElementType eeType,
CORINFO_TYPE_ULONG,
CORINFO_TYPE_FLOAT,
CORINFO_TYPE_DOUBLE,
CORINFO_TYPE_STRING,
CORINFO_TYPE_CLASS,
CORINFO_TYPE_PTR, // PTR
CORINFO_TYPE_BYREF,
CORINFO_TYPE_VALUECLASS,
CORINFO_TYPE_CLASS,
CORINFO_TYPE_VAR, // VAR (type variable)
CORINFO_TYPE_CLASS, // ARRAY
CORINFO_TYPE_CLASS, // WITH
Comment thread
jkotas marked this conversation as resolved.
Outdated
CORINFO_TYPE_REFANY,
CORINFO_TYPE_VALUECLASS,
Comment thread
jkotas marked this conversation as resolved.
Outdated
CORINFO_TYPE_UNDEF, // VALUEARRAY_UNSUPPORTED
CORINFO_TYPE_NATIVEINT, // I
CORINFO_TYPE_NATIVEUINT, // U
Expand All @@ -403,7 +403,7 @@ CorInfoType CEEInfo::asCorInfoType(CorElementType eeType,
// spot check of the map
_ASSERTE((CorInfoType) map[ELEMENT_TYPE_I4] == CORINFO_TYPE_INT);
_ASSERTE((CorInfoType) map[ELEMENT_TYPE_PTR] == CORINFO_TYPE_PTR);
_ASSERTE((CorInfoType) map[ELEMENT_TYPE_TYPEDBYREF] == CORINFO_TYPE_REFANY);
_ASSERTE((CorInfoType) map[ELEMENT_TYPE_TYPEDBYREF] == CORINFO_TYPE_VALUECLASS);

CorInfoType res = ((unsigned)eeType < ELEMENT_TYPE_MAX) ? ((CorInfoType) map[(unsigned)eeType]) : CORINFO_TYPE_UNDEF;

Expand Down
Loading