mirror of
https://github.com/golang/go
synced 2024-11-18 20:14:43 -07:00
go.tools/go/ssa/interp: minor cleanup
LGTM=gri R=gri CC=golang-codereviews https://golang.org/cl/88080044
This commit is contained in:
parent
6157b5a256
commit
bc722df585
@ -139,10 +139,8 @@ func wrapError(err error) value {
|
||||
}
|
||||
|
||||
func ext۰sync۰Pool۰Get(fr *frame, args []value) value {
|
||||
// It would be nice if this were less verbose.
|
||||
sync := fr.i.prog.ImportedPackage("sync")
|
||||
Pool := sync.Type("Pool").Type()
|
||||
_, newIndex, _ := types.LookupFieldOrMethod(Pool, sync.Object, "New")
|
||||
Pool := fr.i.prog.ImportedPackage("sync").Type("Pool").Object()
|
||||
_, newIndex, _ := types.LookupFieldOrMethod(Pool.Type(), Pool.Pkg(), "New")
|
||||
|
||||
if New := (*args[0].(*value)).(structure)[newIndex[0]]; New != nil {
|
||||
return call(fr.i, fr, 0, New, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user