cmd/compile: remove OIOTA

OIOTA used to be used to represent "iota" in the pre-typechecked IR,
before we knew whether it was safe to replace it with a constant
(because it could be redefined as a global symbol later).

However, now types2 handles constant folding, including handling of
"iota". So this can go away.

Updates #51691.

Change-Id: I3cec45b22c4c8f1c357dcc4003292c21ae32aa90
Reviewed-on: https://go-review.googlesource.com/c/go/+/393255
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Matthew Dempsky 2022-03-15 22:49:12 -07:00
parent 1024503f84
commit d661bdeabf
8 changed files with 53 additions and 100 deletions

View file

@ -50,7 +50,6 @@ import (
type Func struct {
miniNode
Body Nodes
Iota int64
Nname *Name // ONAME node
OClosure *ClosureExpr // OCLOSURE node
@ -140,7 +139,6 @@ func NewFunc(pos src.XPos) *Func {
f := new(Func)
f.pos = pos
f.op = ODCLFUNC
f.Iota = -1
// Most functions are ABIInternal. The importer or symabis
// pass may override this.
f.ABI = obj.ABIInternal