You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
type foo struct {
g bar
}
type bar interface{
baz() (int, int)
}
type test struct{
i int
}
func (h *test) baz() (int, int) {
return 0, 0
}
func main() {
f := &foo{}
f.g = &test{}
a, b := f.g.baz()
print(a)
print(b)
}
prints out
# Name: main.main
# Package: main
# Location: /home/daniel/src/test/foo.go:19:6
func main():
0: entry P:0 S:0
t0 = new foo (complit) *foo
; address of *ast.CompositeLit @ 20:8 is t0
; *ast.UnaryExpr @ 20:7 is t0
; var f *main.foo @ 20:2 is t0
; var f *main.foo @ 21:2 is t0
t1 = &t0.g [#0] *bar
; address of field g main.bar @ 21:4 is t1
t2 = new test (complit) *test
; address of *ast.CompositeLit @ 21:9 is t2
; *ast.UnaryExpr @ 21:8 is t2
t3 = make bar <- *test (t2) bar
*t1 = t3
; field g main.bar @ 21:4 is t3
; var f *main.foo @ 22:10 is t0
t4 = &t0.g [#0] *bar
; address of field g main.bar @ 22:12 is t4
t5 = *t4 bar
; *ast.SelectorExpr @ 22:10 is t5
t6 = invoke t5.baz() (int, int)
t7 = extract t6 #0 int
; var a int @ 22:2 is t7
t8 = extract t6 #1 int
; var b int @ 22:5 is t8
; var a int @ 23:8 is t7
t9 = print(t7) ()
; *ast.CallExpr @ 23:2 is t9
; var b int @ 24:8 is t8
t10 = print(t8) ()
; *ast.CallExpr @ 24:2 is t10
return
Note that there is no debug information for t6. This makes it impossible to get callee information via the oracle.
The text was updated successfully, but these errors were encountered:
Running
ssadump -build FD
onprints out
Note that there is no debug information for t6. This makes it impossible to get callee information via the oracle.
The text was updated successfully, but these errors were encountered: