aboutsummaryrefslogtreecommitdiff
path: root/src/reflect/makefunc.go
diff options
context:
space:
mode:
authorhopehook <hopehook.com@gmail.com>2022-02-12 17:03:19 +0800
committerEmmanuel Odeke <emmanuel@orijtech.com>2022-04-04 04:04:18 +0000
commit884e75fa53529321352a18538fe9e02fd485c49a (patch)
tree212d1ab18bab6c996329d8f8c5cf062c4ab450e5 /src/reflect/makefunc.go
parenta92ca515077e5cf54673eb8c5c2d9db4824330db (diff)
downloadgo-884e75fa53529321352a18538fe9e02fd485c49a.tar.xz
reflect: fix the collision of variable name and package name
The return value "abi" of func "funcLayout" is the same as package "internal/abi", which currently works fine, but it is more reliable to avoid conflicts. Change-Id: I83715dd79beff7cb3fc25747fef186dc0e2dfa8b Reviewed-on: https://go-review.googlesource.com/c/go/+/385414 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Diffstat (limited to 'src/reflect/makefunc.go')
-rw-r--r--src/reflect/makefunc.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/reflect/makefunc.go b/src/reflect/makefunc.go
index e4acdc318b..3d9279ceaa 100644
--- a/src/reflect/makefunc.go
+++ b/src/reflect/makefunc.go
@@ -54,14 +54,14 @@ func MakeFunc(typ Type, fn func(args []Value) (results []Value)) Value {
code := abi.FuncPCABI0(makeFuncStub)
// makeFuncImpl contains a stack map for use by the runtime
- _, _, abi := funcLayout(ftyp, nil)
+ _, _, abid := funcLayout(ftyp, nil)
impl := &makeFuncImpl{
makeFuncCtxt: makeFuncCtxt{
fn: code,
- stack: abi.stackPtrs,
- argLen: abi.stackCallArgsSize,
- regPtrs: abi.inRegPtrs,
+ stack: abid.stackPtrs,
+ argLen: abid.stackCallArgsSize,
+ regPtrs: abid.inRegPtrs,
},
ftyp: ftyp,
fn: fn,
@@ -109,13 +109,13 @@ func makeMethodValue(op string, v Value) Value {
code := methodValueCallCodePtr()
// methodValue contains a stack map for use by the runtime
- _, _, abi := funcLayout(ftyp, nil)
+ _, _, abid := funcLayout(ftyp, nil)
fv := &methodValue{
makeFuncCtxt: makeFuncCtxt{
fn: code,
- stack: abi.stackPtrs,
- argLen: abi.stackCallArgsSize,
- regPtrs: abi.inRegPtrs,
+ stack: abid.stackPtrs,
+ argLen: abid.stackCallArgsSize,
+ regPtrs: abid.inRegPtrs,
},
method: int(v.flag) >> flagMethodShift,
rcvr: rcvr,