-
Notifications
You must be signed in to change notification settings - Fork 5.4k
SPMI: Capture EE API exceptions in getNewHelper, and simplify the API shape a bit #89852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5772,7 +5772,7 @@ bool __stdcall TrackAllocationsEnabled() | |
| } | ||
|
|
||
| /***********************************************************************/ | ||
| CorInfoHelpFunc CEEInfo::getNewHelper(CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, bool * pHasSideEffects) | ||
| CorInfoHelpFunc CEEInfo::getNewHelper(CORINFO_CLASS_HANDLE classHandle, CORINFO_METHOD_HANDLE callerHandle, bool* pHasSideEffects) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's used for diagnostics by crossgen2 – I initially actually was deleting it, until I ran into that use.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can replace the use by
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually it shouldn't have any visible behavior difference since if crossgen2 throws the exception during inlining it will just result in the inlining attempt being aborted, and the exception won't be surfaced to the user. So let me make this change.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I do not think it will have different observable behavior. We catch and ignore exceptions during inlining, so the only place where this error can show up is when we fail during compilation of the top level method. When we fail during compilation of the top-level method, we are going to print its name in front of the error message. It is not necessary to duplicate the name of the method that failed to compile in the error message. |
||
| { | ||
| CONTRACTL { | ||
| THROWS; | ||
|
|
@@ -5784,7 +5784,7 @@ CorInfoHelpFunc CEEInfo::getNewHelper(CORINFO_RESOLVED_TOKEN * pResolvedToken, C | |
|
|
||
| JIT_TO_EE_TRANSITION(); | ||
|
|
||
| TypeHandle VMClsHnd(pResolvedToken->hClass); | ||
| TypeHandle VMClsHnd(classHandle); | ||
|
|
||
| if(VMClsHnd.IsTypeDesc()) | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the above documentation comment? It refers to "newCls", which doesn't exist (and didn't before, either), and doesn't describe
pHasSideEffects.