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>
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
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())
if obj != nil {
if isGlobal(obj) {
- w.Code(exprName)
+ w.Code(exprGlobal)
w.obj(obj, targs)
return
}