mirror of
https://github.com/golang/go
synced 2024-11-17 13:44:43 -07:00
cmd/compile: SSA ".this" variable
We used to not SSA ".this" variable, because in tail-call method wrappers it relies on updating ".this" in place in memory, and the tail call IR node and SSA op do not have an explicit use of ".this". It is no longer the case for the new tail call representation. Remove the restriction. Change-Id: I4e1ce8459adbb0d5a80c64f1ece982737bd95305 Reviewed-on: https://go-review.googlesource.com/c/go/+/350751 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
f01721efb9
commit
4b654c0eec
@ -5311,12 +5311,6 @@ func (s *state) canSSAName(name *ir.Name) bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if name.Class == ir.PPARAM && name.Sym() != nil && name.Sym().Name == ".this" {
|
||||
// wrappers generated by genwrapper need to update
|
||||
// the .this pointer in place.
|
||||
// TODO: treat as a PPARAMOUT?
|
||||
return false
|
||||
}
|
||||
return true
|
||||
// TODO: try to make more variables SSAable?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user