patch

package
v1.0.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 17 Imported by: 0

README

patch

This directory contains code to patch the go runtime and compiler:

Documentation

Index

Constants

View Source
const XgoLinkSetTrap = "__xgo_link_set_trap"
View Source
const XgoLinkSetTrapVar = "__xgo_link_set_trap_var"
View Source
const XgoTrapForGenerated = "__xgo_trap_for_generated"
View Source
const XgoTrapVarForGenerated = "__xgo_trap_var_for_generated"

Variables

This section is empty.

Functions

func AddFuncs

func AddFuncs(fn *ir.Func)
func CanInsertTrapOrLink(fn *ir.Func) (string, bool)

func ForEachField

func ForEachField(params []*types.Field, callback func(field *types.Field) bool)

func GetFieldIndex

func GetFieldIndex(fields []*types.Field, i int) *types.Field

func InsertTrapForFunc

func InsertTrapForFunc(fn *ir.Func, forGeneric bool) bool

func NewBasicLit

func NewBasicLit(pos src.XPos, t *types.Type, val constant.Value) ir.Node

func NewBoolLit

func NewBoolLit(pos src.XPos, b bool) ir.Node

func NewFunc

func NewFunc(fpos, npos src.XPos, sym *types.Sym, typ *types.Type) *ir.Func

func NewInt64Lit

func NewInt64Lit(pos src.XPos, i int64) ir.Node

func NewIntLit

func NewIntLit(pos src.XPos, i int) ir.Node

func NewNameAt

func NewNameAt(pos src.XPos, sym *types.Sym, typ *types.Type) *ir.Name

func NewNilExpr

func NewNilExpr(pos src.XPos, t *types.Type) *ir.NilExpr

go 1.20 does not require type

func NewSignature

func NewSignature(pkg *types.Pkg, recv *types.Field, tparams, params, results []*types.Field) *types.Type

func NewStringLit

func NewStringLit(pos src.XPos, s string) ir.Node

func Patch

func Patch()

func SetConvTypeWord

func SetConvTypeWord(conv *ir.ConvExpr, t *types.Type)

func SetConvTypeWordPtr

func SetConvTypeWordPtr(conv *ir.ConvExpr, t *types.Type)

TODO: maybe go1.22 does not need this

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL