8000 GitHub - goplus/reflectx: Golang reflect package hack tools
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

goplus/reflectx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reflectx

Golang reflect package hack tools

Go1.14 Go1.15 Go1.16 Go1.17 Go1.18 Go1.19 Go1.20 Go1.21 Go1.22 Go1.23 Go1.24

Build

  • Go1.14 ~ Go1.22

    go build

  • Go1.23 ~ Go1.24

    go build -ldflags="-checklinkname=0"

ABI

support ABI0 and ABIInternal

  • ABI0 stack-based ABI

  • ABIInternal register-based Go calling convention proposal

    • Go1.17: amd64
    • Go1.18: amd64 arm64 ppc64/ppc64le
    • Go1.19: amd64 arm64 ppc64/ppc64le riscv64
    • Go1.20: amd64 arm64 ppc64/ppc64le riscv64
    • Go1.21: amd64 arm64 ppc64/ppc64le riscv64
    • Go1.22: amd64 arm64 ppc64/ppc64le riscv64 loong64
    • Go1.23: amd64 arm64 ppc64/ppc64le riscv64 loong64
    • Go1.24: amd64 arm64 ppc64/ppc64le riscv64 loong64

Field

  • reflectx.CanSet
  • reflectx.Field
  • reflectx.FieldByIndex
  • reflectx.FieldByName
  • reflectx.FieldByNameFunc

Named

  • reflectx.StructOf(fs)

  • reflectx.NamedTypeOf

  • SetUnderlying

  • SetTypeName

Method

  • reflectx.Method

  • reflectx.MakeMethod

  • reflectx.NewMethodSet

  • reflectx.SetMethodSet

  • reflectx.StructToMethodSet

Interface

  • reflectx.InterfaceOf
  • reflectx.NamedInterfaceOf
  • reflectx.NewInterfaceType
  • reflectx.SetInterfaceType

Context

  • reflectx.NewContext()

Method allocs

  • allocs
import _ "github.com/goplus/reflectx/icall/icall[N]"
  • install icall_gen
go install github.com/goplus/reflectx/cmd/icall_gen@latest
icall_gen -o icall1024.go -pkg main -size 1024

About

Golang reflect package hack tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0