julia
f47e0927 - Fix functionloc by adding line nodes to method signatures (#35138)

Commit
5 years ago
Fix functionloc by adding line nodes to method signatures (#35138) This comes in three pieces: * In the parser, put an additional LineNumberNode at the top of each function body to track the line of the function definition * In lowering, remove this LineNumberNode from the body and add it as the last parameter to method signature in `Expr(:method, name, sig, body)` * In the runtime, extract the line number node from sig and add it to the jl_method_t. Since the first line is now correctly tracked separately from the body, a special case in coverage codegen was removed. This was required when line numbers were tracked in a different way - see origin of this in the use of `toplineno` in bug #17442 and fix #17470.
Author
Parents
Loading