]> Cypherpunks repositories - gostls13.git/commit
reflect: add register ABI support for makeFuncStub and methodValueCall
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 28 Jan 2021 15:23:05 +0000 (15:23 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 2 Apr 2021 16:53:18 +0000 (16:53 +0000)
commit28c5fed5576483cc696db233d7f6fffecd2833a2
tree00109d3e508e63bbfff7c5c73f2b54ea321c402c
parent6996bae5d1d34ea9e2ab6399f70adb402697ed94
reflect: add register ABI support for makeFuncStub and methodValueCall

This change finishes off functionality register ABI for the reflect
package.

Specifically, it implements a call on a MakeFunc'd value by performing
the reverse process that reflect.Value.Call does, using the same ABI
steps. It implements a call on a method value created by reflect by
translating between the method value's ABI to the method's ABI.

Tests are added for both cases.

For #40724.

Change-Id: I302820b61fc0a8f94c5525a002bc02776aef41af
Reviewed-on: https://go-review.googlesource.com/c/go/+/298670
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
18 files changed:
src/reflect/abi.go
src/reflect/abi_test.go
src/reflect/asm_386.s
src/reflect/asm_amd64.s
src/reflect/asm_arm.s
src/reflect/asm_arm64.s
src/reflect/asm_mips64x.s
src/reflect/asm_mipsx.s
src/reflect/asm_ppc64x.s
src/reflect/asm_riscv64.s
src/reflect/asm_s390x.s
src/reflect/asm_wasm.s
src/reflect/makefunc.go
src/reflect/value.go
src/runtime/asm_amd64.s
src/runtime/stack.go
src/runtime/stubs_amd64.go
src/runtime/traceback.go