utils

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoadFactor   = 0.5
	InitCapacity = 4096 // must be a power of 2
)

Variables

View Source
var FnWrite = hir.RegisterICall(
	rt.GetMethod((*iov.BufferWriter)(nil), "WriteDirect"),
	emu_icall_ZeroCopyWriter_WriteDirect,
)
View Source
var ForceEmulator = os.Getenv("FRUGAL_BACKEND") == "emu"

Functions

func IsByteType

func IsByteType(vt reflect.Type) bool

func MaxInt

func MaxInt(a int, b int) int

Types

type ProgramCache

type ProgramCache struct {
	// contains filtered or unexported fields
}

func CreateProgramCache

func CreateProgramCache() *ProgramCache

func (*ProgramCache) Compute

func (self *ProgramCache) Compute(vt *rt.GoType, compute func(*rt.GoType) (interface{}, error)) (interface{}, error)

func (*ProgramCache) Get

func (self *ProgramCache) Get(vt *rt.GoType) interface{}

type ProgramEntry

type ProgramEntry struct {
	// contains filtered or unexported fields
}

type ProgramMap

type ProgramMap struct {
	// contains filtered or unexported fields
}

type SyntaxError

type SyntaxError struct {
	Pos    int
	Src    string
	Reason string
}

func ESetList

func ESetList(pos int, src string, vt reflect.Type) SyntaxError

func ESyntax

func ESyntax(pos int, src string, reason string) SyntaxError

func (SyntaxError) Error

func (self SyntaxError) Error() string

type TypeError

type TypeError struct {
	Note string
	Type reflect.Type
}

func ENotSupp

func ENotSupp(vt reflect.Type, alt string) TypeError

func EType

func EType(vt reflect.Type) TypeError

func (TypeError) Error

func (self TypeError) Error() string

Jump to

Keyboard shortcuts

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