constants

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNTIME_INTERNAL_RUNTIME_PKG = "github.com/xhd2015/xgo/runtime/internal/runtime"
	RUNTIME_INTERNAL_TRAP_PKG    = "github.com/xhd2015/xgo/runtime/internal/trap"
	RUNTIME_TRAP_FLAGS_PKG       = "github.com/xhd2015/xgo/runtime/internal/flags"
	RUNTIME_FUNCTAB_PKG          = "github.com/xhd2015/xgo/runtime/functab"
	RUNTIME_CORE_PKG             = "github.com/xhd2015/xgo/runtime/core"
	RUNTIME_MOCK_PKG             = "github.com/xhd2015/xgo/runtime/mock"
	RUNTIME_TRACE_PKG            = "github.com/xhd2015/xgo/runtime/trace"
	RUNTIME_TRAP_PKG             = "github.com/xhd2015/xgo/runtime/trap"
)
View Source
const (
	RUNTIME_LINK_TEMPLATE_FILE = "runtime_link_template.go"
	RUNTIME_LINK_FILE          = "runtime_link.go" // xgo/runtime/internal/runtime/runtime_link.go

	XGO_TRAP_TEMPLATE_FILE = "xgo_trap_template.go"
	XGO_TRAP_FILE          = "xgo_trap.go" // GOROOT/src/runtime/xgo_trap.go

	FUNCTAB_FILE             = "functab.go"
	RUNTIME_FUNCTAB_REGISTER = "RegisterFunc"

	VERSION_FILE = "version.go"
	FLAG_FILE    = "flags.go"
	TRACE_FILE   = "trace.go"
)
View Source
const (
	XGO_REAL_NOW   = "XgoRealNow"
	XGO_REAL_SLEEP = "XgoRealSleep"
)
View Source
const (
	LINK_REGISTER     = "__xgo_register_"
	LINK_TRAP_FUNC    = "__xgo_trap_"
	LINK_TRAP_VAR     = "__xgo_trap_var_"
	LINK_TRAP_VAR_PTR = "__xgo_trap_varptr_"
)
View Source
const (
	FUNC_INFO_TYPE = "__xgo_func_info_"
	PKG_VAR        = "__xgo_pkg_"
	FILE_VAR       = "__xgo_file_"
	// for variable
	FILE_VAR_FOR_VAR = "__xgo_file_var_"
	// for compiler extra
	FILE_VAR_GC = "__xgo_file_gc_"
	INIT_FUNC   = "__xgo_init_"
)
View Source
const (
	FUNC_INFO = "__xgo_func_info" // __xgo_func_info_<fileIndex>_<declIndex>
	VAR_INFO  = "__xgo_var_info"  // __xgo_var_info_<fileIndex>_<declIndex>
	INTF_INFO = "__xgo_intf_info" // __xgo_intf_info_<fileIndex>_<declIndex>
)
View Source
const (
	// __xgo_register
	REGISTER_SIGNATURE = "func(v interface{}){}"
	// __xgo_trap
	TRAP_FUNC_SIGNATURE = "func(info interface{}, recvPtr interface{}, args []interface{}, results []interface{}) (func(), bool){return nil, false;}"
	// __xgo_trap_var
	TRAP_VAR_SIGNATURE = "func(info interface{}, varAddr interface{}, res interface{}){}"
	// __xgo_trap_varptr
	TRAP_VAR_PTR_SIGNATURE = "func(info interface{}, varAddr interface{}, res interface{}){}"
)
View Source
const (
	// see https://github.com/xhd2015/xgo/blob/branch-xgo-v1.0/runtime/core/version.go
	// the corresponding commit is 4123ef9cd711daea863cd3cf319989a581debaad
	LATEST_LEGACY_RUNTIME_NUMBER = 324
)
View Source
const (
	REG_FILE_GEN = "__xgo_reg_file_gen_"
)
View Source
const (
	// Deprecated: we can remove once xgo/runtime v1.1.0 no longer used
	RUNTIME_LEGACY_CORE_INFO_PKG = "github.com/xhd2015/xgo/runtime/core/info"
)

legacy

View Source
const RUNTIME_MODULE = "github.com/xhd2015/xgo/runtime"

Variables

View Source
var FUNC_INFO_FIELDS = []string{
	"Kind int",
	"FullName string",
	"Pkg string",
	"IdentityName string",
	"Name string",
	"RecvType string",
	"RecvPtr bool",
	"Interface bool",
	"Generic bool",
	"Closure bool",
	"Stdlib bool",
	"File string",
	"Line int",
	"PC uintptr",
	"Func interface{}",
	"Var interface{}",
	"RecvName string",
	"ArgNames []string",
	"ResNames []string",
	"FirstArgCtx bool",
	"LastResultErr bool",
}
View Source
var RUNTIME_LINK_TEMPLATE_PATH = []string{"internal", "runtime", RUNTIME_LINK_TEMPLATE_FILE}
View Source
var RUNTIME_XGO_TRAP_TEMPLATE_PATH = []string{"internal", "runtime", XGO_TRAP_TEMPLATE_FILE}

Functions

func FileVar added in v1.1.4

func FileVar(fileIndex int) string

func FileVarForVar added in v1.1.4

func FileVarForVar(fileIndex int) string

func FileVarGc added in v1.1.4

func FileVarGc(fileIndex int) string

func FuncInfoType added in v1.1.4

func FuncInfoType(fileIndex int) string

func FuncInfoVarName added in v1.1.4

func FuncInfoVarName(fileIndex int, declIndex int) string

func GetGoRuntimeXgoTrapFile added in v1.1.1

func GetGoRuntimeXgoTrapFile(goroot string) string

func InitFunc added in v1.1.4

func InitFunc(fileIndex int) string

func IntfInfoVarName added in v1.1.4

func IntfInfoVarName(fileIndex int, declIndex int) string

func PkgVar added in v1.1.4

func PkgVar(fileIndex int) string

func RegFileGen added in v1.1.4

func RegFileGen(fileIndex int) string

func Register added in v1.1.4

func Register(fileIndex int) string

func Trap added in v1.1.4

func Trap(fileIndex int) string

func TrapVar added in v1.1.4

func TrapVar(fileIndex int) string

func TrapVarPtr added in v1.1.4

func TrapVarPtr(fileIndex int) string

func VarInfoVarName added in v1.1.4

func VarInfoVarName(fileIndex int, declIndex int) string

Types

type InfoKind added in v1.1.4

type InfoKind int
const (
	InfoKind_Func   InfoKind = 0
	InfoKind_Var    InfoKind = 1
	InfoKind_VarPtr InfoKind = 2
	InfoKind_Const  InfoKind = 3
)

Jump to

Keyboard shortcuts

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