aboutsummaryrefslogtreecommitdiff
path: root/src/reflect/makefunc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflect/makefunc.go')
-rw-r--r--src/reflect/makefunc.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/reflect/makefunc.go b/src/reflect/makefunc.go
index 588be8bcc1..d0b0935cb8 100644
--- a/src/reflect/makefunc.go
+++ b/src/reflect/makefunc.go
@@ -107,7 +107,7 @@ func makeMethodValue(op string, v Value) Value {
// v.Type returns the actual type of the method value.
ftyp := (*funcType)(unsafe.Pointer(v.Type().(*rtype)))
- code := abi.FuncPCABI0(methodValueCall)
+ code := methodValueCallCodePtr()
// methodValue contains a stack map for use by the runtime
_, _, abi := funcLayout(ftyp, nil)
@@ -130,6 +130,10 @@ func makeMethodValue(op string, v Value) Value {
return Value{&ftyp.rtype, unsafe.Pointer(fv), v.flag&flagRO | flag(Func)}
}
+func methodValueCallCodePtr() uintptr {
+ return abi.FuncPCABI0(methodValueCall)
+}
+
// methodValueCall is an assembly function that is the code half of
// the function returned from makeMethodValue. It expects a *methodValue
// as its context register, and its job is to invoke callMethod(ctxt, frame)