mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: add tests for reflect.Value.Call for the new ABI
This change adds tests for reflect.Value.Call for calling functions using the new register-based ABI. For #40724. Change-Id: Ia9afd43e26dd80c7e36dd135a5b71acce8074801 Reviewed-on: https://go-review.googlesource.com/c/go/+/299269 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>
This commit is contained in:
parent
79d03ad739
commit
bdbba22404
2 changed files with 461 additions and 1 deletions
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
package reflect
|
||||
|
||||
import "unsafe"
|
||||
import (
|
||||
"sync"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// MakeRO returns a copy of v with the read-only flag set.
|
||||
func MakeRO(v Value) Value {
|
||||
|
|
@ -17,6 +20,12 @@ func IsRO(v Value) bool {
|
|||
return v.flag&flagStickyRO != 0
|
||||
}
|
||||
|
||||
var (
|
||||
IntArgRegs = &intArgRegs
|
||||
FloatArgRegs = &floatArgRegs
|
||||
FloatRegSize = &floatRegSize
|
||||
)
|
||||
|
||||
var CallGC = &callGC
|
||||
|
||||
const PtrSize = ptrSize
|
||||
|
|
@ -122,3 +131,7 @@ func ResolveReflectName(s string) {
|
|||
type Buffer struct {
|
||||
buf []byte
|
||||
}
|
||||
|
||||
func ClearLayoutCache() {
|
||||
layoutCache = sync.Map{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue