Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8d9b3ef
NativeAOT: Implement a fake EH filter for generic exceptions
EgorBo Jul 23, 2022
7d4bcbd
Add smoke test
EgorBo Jul 23, 2022
39752c7
Update GenericExceptions.cs
EgorBo Jul 23, 2022
3a045da
CI test
EgorBo Jul 23, 2022
fd57c28
Merge branch 'nativeaot-eh-generic-exception' of github.com:EgorBo/ru…
EgorBo Jul 23, 2022
f24208a
Address feedback & fix AVE
EgorBo Jul 23, 2022
f7c55a7
Clean up
EgorBo Jul 23, 2022
861c6c3
Fix runtime lookup for NativeAOT & Crossgen
EgorBo Jul 23, 2022
8a72927
Another attempt to fix runtime lookup (now should be working)
EgorBo Jul 23, 2022
58d3b77
Remove tests from issues.targets
EgorBo Jul 24, 2022
54763a7
Move fgCreateFiltersForGenericExceptions to fgAddInternal
EgorBo Jul 24, 2022
a32b92a
simplify runtime lookup
EgorBo Jul 24, 2022
3668e25
Address feedback
EgorBo Jul 24, 2022
49635eb
Implement HELPER_SimpleIsInstanceOf
EgorBo Jul 25, 2022
f8a50a5
Merge branch 'main' of github.com:dotnet/runtime into nativeaot-eh-ge…
EgorBo Jul 25, 2022
2a47ff9
Clean up
EgorBo Jul 25, 2022
bee1fb3
Add Jan's IL test
EgorBo Jul 25, 2022
10ca969
Address feedback (NativeAOT's part is not finished yet)
EgorBo Jul 25, 2022
79e87b8
remove dead code
EgorBo Jul 25, 2022
5420035
Update src/tests/JIT/Generics/Exceptions/GenericCatchInterfaceProgram.cs
EgorBo Jul 25, 2022
9cf10d2
Fix test
EgorBo Jul 25, 2022
fd3130e
NativeAOT fix
EgorBo Jul 25, 2022
22f2520
remove "variance" block
EgorBo Jul 25, 2022
9110e5f
Address feedback
EgorBo Jul 25, 2022
d3c01cb
Remove IsPolyType
EgorBo Jul 25, 2022
aaa075e
rename csproj to ilproj
EgorBo Jul 25, 2022
98ce006
Update src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanne…
EgorBo Jul 26, 2022
5c7c157
Disable test on mono
EgorBo Jul 26, 2022
40ca568
Merge branch 'main' of github.com:dotnet/runtime into nativeaot-eh-ge…
EgorBo Jul 26, 2022
d13147d
Update src/coreclr/jit/jiteh.cpp
EgorBo Jul 28, 2022
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
Prev Previous commit
Next Next commit
Remove IsPolyType
  • Loading branch information
EgorBo committed Jul 25, 2022
commit d3c01cb9e53754063d8ef263b578a49b7d12ccc4
115 changes: 0 additions & 115 deletions src/coreclr/vm/siginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,121 +1869,6 @@ TypeHandle SigPointer::GetTypeVariable(CorElementType et,

#ifndef DACCESS_COMPILE

// Does this type contain class or method type parameters whose instantiation cannot
// be determined at JIT-compile time from the instantiations in the method context?
// Return a combination of hasClassVar and hasMethodVar flags.
// See header file for more info.
VarKind SigPointer::IsPolyType(const SigTypeContext *pTypeContext) const
{
CONTRACTL
{
INSTANCE_CHECK;
NOTHROW;
GC_NOTRIGGER;
MODE_ANY;
}
CONTRACTL_END

SigPointer psig = *this;
CorElementType typ;

if (FAILED(psig.GetElemType(&typ)))
return hasNoVars;

switch(typ) {
case ELEMENT_TYPE_VAR:
case ELEMENT_TYPE_MVAR:
{
VarKind res = (typ == ELEMENT_TYPE_VAR ? hasClassVar : hasMethodVar);
if (pTypeContext != NULL)
{
TypeHandle ty = psig.GetTypeVariable(typ, pTypeContext);
if (ty.IsCanonicalSubtype())
res = (VarKind) (res | (typ == ELEMENT_TYPE_VAR ? hasSharableClassVar : hasSharableMethodVar));
}
return (res);
}

case ELEMENT_TYPE_U:
case ELEMENT_TYPE_I:
case ELEMENT_TYPE_STRING:
case ELEMENT_TYPE_OBJECT:
case ELEMENT_TYPE_I1:
case ELEMENT_TYPE_U1:
case ELEMENT_TYPE_BOOLEAN:
case ELEMENT_TYPE_I2:
case ELEMENT_TYPE_U2:
case ELEMENT_TYPE_CHAR:
case ELEMENT_TYPE_I4:
case ELEMENT_TYPE_U4:
case ELEMENT_TYPE_I8:
case ELEMENT_TYPE_U8:
case ELEMENT_TYPE_R4:
case ELEMENT_TYPE_R8:
case ELEMENT_TYPE_VOID:
case ELEMENT_TYPE_CLASS:
case ELEMENT_TYPE_VALUETYPE:
case ELEMENT_TYPE_TYPEDBYREF:
return(hasNoVars);

case ELEMENT_TYPE_GENERICINST:
{
VarKind k = psig.IsPolyType(pTypeContext);
if (FAILED(psig.SkipExactlyOne()))
return hasNoVars;

uint32_t ntypars;
if(FAILED(psig.GetData(&ntypars)))
return hasNoVars;

for (uint32_t i = 0; i < ntypars; i++)
{
k = (VarKind) (psig.IsPolyType(pTypeContext) | k);
if (FAILED(psig.SkipExactlyOne()))
return hasNoVars;
}
return(k);
}

case ELEMENT_TYPE_ARRAY:
case ELEMENT_TYPE_SZARRAY:
case ELEMENT_TYPE_PINNED:
case ELEMENT_TYPE_BYREF:
case ELEMENT_TYPE_PTR:
{
return(psig.IsPolyType(pTypeContext));
}

case ELEMENT_TYPE_FNPTR:
{
if (FAILED(psig.GetData(NULL)))
return hasNoVars;

// Get arg count;
uint32_t cArgs;
if (FAILED(psig.GetData(&cArgs)))
return hasNoVars;

VarKind k = psig.IsPolyType(pTypeContext);
if (FAILED(psig.SkipExactlyOne()))
return hasNoVars;

for (unsigned i = 0; i < cArgs; i++)
{
k = (VarKind) (psig.IsPolyType(pTypeContext) | k);
if (FAILED(psig.SkipExactlyOne()))
return hasNoVars;
}

return(k);
}

default:
BAD_FORMAT_NOTHROW_ASSERT(!"Bad type");
}
return(hasNoVars);
}

BOOL SigPointer::IsStringType(Module* pModule, const SigTypeContext *pTypeContext) const
{
WRAPPER_NO_CONTRACT;
Expand Down
28 changes: 0 additions & 28 deletions src/coreclr/vm/siginfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,6 @@ class ArgDestination;

typedef const struct HardCodedMetaSig *LPHARDCODEDMETASIG;

//@GENERICS: flags returned from IsPolyType indicating the presence or absence of class and
// method type parameters in a type whose instantiation cannot be determined at JIT-compile time
enum VarKind
{
hasNoVars = 0x0000,
hasClassVar = 0x0001,
hasMethodVar = 0x0002,
hasSharableClassVar = 0x0004,
hasSharableMethodVar = 0x0008,
hasAnyVarsMask = 0x0003,
hasSharableVarsMask = 0x000c
};

//---------------------------------------------------------------------------------------

struct ScanContext;
Expand Down Expand Up @@ -256,21 +243,6 @@ class SigPointer : public SigParser
MethodTable *pMTInterfaceMapOwner = NULL) const;

public:
//------------------------------------------------------------------------
// Does this type contain class or method type parameters whose instantiation cannot
// be determined at JIT-compile time from the instantiations in the method context?
// Return a combination of hasClassVar and hasMethodVar flags.
//
// Example: class C<A,B> containing instance method m<T,U>
// Suppose that the method context is C<float,string>::m<double,object>
// Then the type Dict<!0,!!0> is considered to have *no* "polymorphic" type parameters because
// !0 is known to be float and !!0 is known to be double
// But Dict<!1,!!1> has polymorphic class *and* method type parameters because both
// !1=string and !!1=object are reference types and so code using these can be shared with
// other reference instantiations.
//------------------------------------------------------------------------
VarKind IsPolyType(const SigTypeContext *pTypeContext) const;

//------------------------------------------------------------------------
// Tests if the element type is a System.String. Accepts
// either ELEMENT_TYPE_STRING or ELEMENT_TYPE_CLASS encoding.
Expand Down