aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/dcl.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-01-15 14:12:35 -0800
committerDan Scales <danscales@google.com>2021-01-16 02:31:08 +0000
commita956a0e909e1d60c8d55339e5e591a9d1db885c4 (patch)
tree27b744813492ca6ac686bb2cf7b8ff18841f779c /src/cmd/compile/internal/typecheck/dcl.go
parentab3b67abfd9bff30fc001c966ab121bacff3de9b (diff)
downloadgo-a956a0e909e1d60c8d55339e5e591a9d1db885c4.tar.gz
go-a956a0e909e1d60c8d55339e5e591a9d1db885c4.zip
[dev.regabi] cmd/compile, runtime: fix up comments/error messages from recent renames
Went in a semi-automated way through the clearest renames of functions, and updated comments and error messages where it made sense. Change-Id: Ied8e152b562b705da7f52f715991a77dab60da35 Reviewed-on: https://go-review.googlesource.com/c/go/+/284216 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/dcl.go')
-rw-r--r--src/cmd/compile/internal/typecheck/dcl.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/typecheck/dcl.go b/src/cmd/compile/internal/typecheck/dcl.go
index c7d7506fd1..c324238bf1 100644
--- a/src/cmd/compile/internal/typecheck/dcl.go
+++ b/src/cmd/compile/internal/typecheck/dcl.go
@@ -41,7 +41,7 @@ func Declare(n *ir.Name, ctxt ir.Class) {
s := n.Sym()
- // kludgy: typecheckok means we're past parsing. Eg genwrapper may declare out of package names later.
+ // kludgy: TypecheckAllowed means we're past parsing. Eg reflectdata.methodWrapper may declare out of package names later.
if !inimport && !TypecheckAllowed && s.Pkg != types.LocalPkg {
base.ErrorfAt(n.Pos(), "cannot declare name %v", s)
}
@@ -308,7 +308,7 @@ func fakeRecvField() *types.Field {
return types.NewField(src.NoXPos, nil, types.FakeRecvType())
}
-var funcStack []funcStackEnt // stack of previous values of Curfn/dclcontext
+var funcStack []funcStackEnt // stack of previous values of ir.CurFunc/DeclContext
type funcStackEnt struct {
curfn *ir.Func
@@ -398,14 +398,14 @@ func Temp(t *types.Type) *ir.Name {
// make a new Node off the books
func TempAt(pos src.XPos, curfn *ir.Func, t *types.Type) *ir.Name {
if curfn == nil {
- base.Fatalf("no curfn for tempAt")
+ base.Fatalf("no curfn for TempAt")
}
if curfn.Op() == ir.OCLOSURE {
- ir.Dump("tempAt", curfn)
- base.Fatalf("adding tempAt to wrong closure function")
+ ir.Dump("TempAt", curfn)
+ base.Fatalf("adding TempAt to wrong closure function")
}
if t == nil {
- base.Fatalf("tempAt called with nil type")
+ base.Fatalf("TempAt called with nil type")
}
if t.Kind() == types.TFUNC && t.Recv() != nil {
base.Fatalf("misuse of method type: %v", t)