mirror of https://github.com/golang/go.git
[dev.unified] cmd/compile/internal/noder: rename exprName to exprGlobal
More descriptive. Change-Id: I70a07adbe1d395da797fe15b54d2a1106f5f36a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/410098 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
4d28fcabb4
commit
6c33f1d52e
|
|
@ -40,9 +40,9 @@ func (c codeExpr) Value() int { return int(c) }
|
|||
const (
|
||||
exprNone codeExpr = iota
|
||||
exprConst
|
||||
exprType // type expression
|
||||
exprLocal // local variable
|
||||
exprName // global variable or function
|
||||
exprType // type expression
|
||||
exprLocal // local variable
|
||||
exprGlobal // global variable or function
|
||||
exprBlank
|
||||
exprCompLit
|
||||
exprFuncLit
|
||||
|
|
|
|||
|
|
@ -1562,7 +1562,7 @@ func (r *reader) expr() (res ir.Node) {
|
|||
case exprLocal:
|
||||
return typecheck.Expr(r.useLocal())
|
||||
|
||||
case exprName:
|
||||
case exprGlobal:
|
||||
// Callee instead of Expr allows builtins
|
||||
// TODO(mdempsky): Handle builtins directly in exprCall, like method calls?
|
||||
return typecheck.Callee(r.obj())
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ func (w *writer) expr(expr syntax.Expr) {
|
|||
|
||||
if obj != nil {
|
||||
if isGlobal(obj) {
|
||||
w.Code(exprName)
|
||||
w.Code(exprGlobal)
|
||||
w.obj(obj, targs)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue