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
inliner destroys line number information #7518
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7518?orig=1
|
@JamesIry said: |
@retronym said: |
@retronym said (edited on May 29, 2013 7:07:58 AM UTC): class Test {
@inline final def foo[A](a: => A) = a
def client {
foo {
println("line 6")
}
}
} With
Without
|
@retronym said: retronym/scala@scala:2.10.x...ticket/7518
James, assigning this to you for an opinion. |
@retronym said: |
@retronym said: |
@JamesIry said: TL;DR Inlining from one source file into another source file must lose debug information. |
@JamesIry said (edited on May 29, 2013 4:17:03 PM UTC): |
@retronym said: But I got a bit lost in the code trying to implement this correctly. |
@JamesIry said: |
@magarciaEPFL said:
A sidenote: Why aren't the instructions above also inlined alongside the instructions inlined for the higher-order method? Inlining a static method (e.g., the delegate above) is better done by the VM. Moreover, that's what the current optimizer does, with the consequence that:
With the new optimizer, the only way to avoid the code-duplication above is to write "optimizer-quirks-aware" code, as was done for |
@magarciaEPFL said: |
@retronym said: |
@lrytz should this stay open? |
no, let's track the rest at scala/scala-dev#3 |
In the attached screenshot, debugging Scala 2.10.2-RC1, you can see the call stack shows
I expect:
Where line 881 is in the inlined lambda.
The text was updated successfully, but these errors were encountered: