Always zero-init pointery-typed vars on resume

This commit is contained in:
Nigel Tao committed 2018-05-13 10:57:15 +10:00
1 parent a86023b290
commit 56c27ed3c3
3 files changed
+4 -2

No files matched your search

+1 -2
View File
@@ -282,8 +282,7 @@ func (g *gen) writeResumeSuspend1(b *buffer, n *a.Var, suspend bool, initBoolTyp
local := fmt.Sprintf("%s%s", vPrefix, n.Name().Str(g.tm))
if typ := n.XType(); typ.HasPointers() {
// TODO: drop the initBoolTypedVars.
if suspend || initBoolTypedVars {
if suspend {
return nil
}
rhs := ""