Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't erase source information for inline functions #824
Include debug info sequence points for inlined functions
I propose we stop erasing the debugging sequence points for functions which have been inlined by the compiler.
The existing state is that code which has been inlined has no source file or line information. This has the effect that:
The second is more dangerous, and can lead to tests showing as passing when in fact recent edits should have broken them.
Pros and Cons
The advantages of making this adjustment to F# are
The disadvantages of making this adjustment to F# are
Estimated cost (XS, S, M, L, XL, XXL): XS -> M, depending on whether an option would be required and whether cross-assembly inlining causes a problems.
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
I've discussed this to some length with @dsyme a few years back and if I recall, he said it would be possible in principle, but far from trivial to implement.
I think there are several request out there, and maybe even some that are approved already, I'll have a look.
One tricky thing to consider is: how can a single position be both in the call site as well as on the target site of a function?
Perhaps this is easy in debug builds with noop, but in release builds I'm not so sure (and in fact, code coverage misses many more lines in release builds than only what's an inline function).
I need to think through the details, but in principle the core change is very very simple - remove the use of
The problem may be in other places, e.g. what happens when we beta-reduce a lambda application after copying, or what goes wrong with other debugging generally.
Anyway if you want to play around with these that's where to begin I think