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 (
|
const (
|
||||||
exprNone codeExpr = iota
|
exprNone codeExpr = iota
|
||||||
exprConst
|
exprConst
|
||||||
exprType // type expression
|
exprType // type expression
|
||||||
exprLocal // local variable
|
exprLocal // local variable
|
||||||
exprName // global variable or function
|
exprGlobal // global variable or function
|
||||||
exprBlank
|
exprBlank
|
||||||
exprCompLit
|
exprCompLit
|
||||||
exprFuncLit
|
exprFuncLit
|
||||||
|
|
|
||||||
|
|
@ -1562,7 +1562,7 @@ func (r *reader) expr() (res ir.Node) {
|
||||||
case exprLocal:
|
case exprLocal:
|
||||||
return typecheck.Expr(r.useLocal())
|
return typecheck.Expr(r.useLocal())
|
||||||
|
|
||||||
case exprName:
|
case exprGlobal:
|
||||||
// Callee instead of Expr allows builtins
|
// Callee instead of Expr allows builtins
|
||||||
// TODO(mdempsky): Handle builtins directly in exprCall, like method calls?
|
// TODO(mdempsky): Handle builtins directly in exprCall, like method calls?
|
||||||
return typecheck.Callee(r.obj())
|
return typecheck.Callee(r.obj())
|
||||||
|
|
|
||||||
|
|
@ -1236,7 +1236,7 @@ func (w *writer) expr(expr syntax.Expr) {
|
||||||
|
|
||||||
if obj != nil {
|
if obj != nil {
|
||||||
if isGlobal(obj) {
|
if isGlobal(obj) {
|
||||||
w.Code(exprName)
|
w.Code(exprGlobal)
|
||||||
w.obj(obj, targs)
|
w.obj(obj, targs)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue