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
cmd/compile: display the source code for inlined functions in ssa.html #25904
Comments
package main
import "encoding/binary"
var x uint16
var b [2]byte
func f() {
x = g(x)
binary.BigEndian.PutUint16(b[:], x)
}
func g(i uint16) uint16 {
return i + 1
} it should include sources for both |
@randall77 @dr2chase @josharian Does the screenshot below look right? Any feedback is very welcome! |
On my phone, but my initial response is “Hooray! This is going to be super helpful!” It might be nice to toposort, that is, put the main function at the top and inlined functions below (and functions inlined by the inlined functions below that, etc.). |
This is quite nice. Thank you for working on this. |
Change https://golang.org/cl/126606 mentions this issue: |
Change https://golang.org/cl/126605 mentions this issue: |
This CL exports the Func.Endlineno value for inlineable functions. It is needed to grab the source code of an imported function inlined into the function specified in $GOSSAFUNC. See CL 126606 for details. Updates #25904 Change-Id: I1e259e20445e4109b4621a95abb5bde1be457af1 Reviewed-on: https://go-review.googlesource.com/126605 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
CL 119035 added displaying the source code of target function as the first column in ssa.html table.
It would be great to handle inlined function correctly too, e.g. display their sources as well.
The text was updated successfully, but these errors were encountered: