Uh oh!
There was an error while loading. Please reload this page.
Preserve static type info for return value of ctor - #101212
Conversation
jtschuster
commented
Apr 17, 2024
With these changes, are we able to remove the runtime/src/tools/illink/src/linker/Linker.Dataflow/MethodBodyScanner.cs Lines 1107 to 1119 in b35b67d |
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas |
sbomer
commented
Apr 17, 2024
On the linker side I'm seeing some cases where |
jtschuster
left a comment
There was a problem hiding this comment.
Assuming you tested it on the code that caused the original issue, LGTM.
MichalStrehovsky
commented
Apr 18, 2024
If we want to remove that, I'd remove the whole We have too many codepaths that try to manufacture a default return value. There's the one this PR is changing on line 1170 of HandleCallAction, but we also have these: I wonder if we should change those too. Ideally there would only be one place that manufactures these and not 3. This place has the most context to do the right thing though (it is the place where we see it's a constructor, and the instruction was |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Instead of tracking the return value as "TopValue" or "unknown", this models the constructor as returning a value with a static type when called with newobj, letting us undo the workaround from dotnet#101031.
Instead of tracking the return value as "TopValue" or "unknown", this models the constructor as returning a value with a static type when called with newobj, letting us undo the workaround from dotnet#101031.
Fixes#101102.
Instead of tracking the return value as "unknown", this models the constructor as returning a value with a static type, letting us undo the workaround from #101031.