values

package
v0.0.0-...-61d83ea Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hv_Key

func Hv_Key(s Scalar) interface{}

Obtains a Raw key for use as map-key.

func RawScalarComp

func RawScalarComp(a, b interface{}) int

func ScalarComp

func ScalarComp(a, b Scalar) int

func ScalarLess

func ScalarLess(a, b Scalar) bool

Types

type AV

type AV []Scalar

func (*AV) Fetch

func (av *AV) Fetch(i int64, unset bool) Scalar

Retrieves the scalar from the given index. If unset is true, it replaces the existing value (at that location) with an null.

func (*AV) FetchSlot

func (av *AV) FetchSlot(i int64, unset bool) ScalarSlot

Retrieves the scalar from the given index. If unset is true, it replaces the existing value (at that location) with an null. Note that FetchSlot returns ScalarSlot, not Scalar. This way you can update the slot as you wish.

func (*AV) FetchUp

func (av *AV) FetchUp(i int64, unset bool) *Scalar

Retrieves the scalar from the given index. If unset is true, it replaces the existing value (at that location) with an null. Note that FetchUp returns *Scalar, not Scalar. This way you can update the slot as you wish.

func (*AV) Len

func (av *AV) Len() int

Returns the highest index of the array (such as $#array).

func (*AV) Pop

func (av *AV) Pop(s Scalar) Scalar

func (*AV) Push

func (av *AV) Push(s Scalar)

func (*AV) Store

func (av *AV) Store(i int64) *Scalar

func (*AV) StoreSlot

func (av *AV) StoreSlot(i int64) ScalarSlot

type ClassLoaderRef

type ClassLoaderRef struct {
	ClassLoader unsafe.Pointer // *vm.ClassLoader
}

type HV

type HV struct {
	Map sync.Map
}

func (*HV) Clear

func (hv *HV) Clear()

func (*HV) Delete

func (hv *HV) Delete(key Scalar)

func (*HV) FromAV

func (hv *HV) FromAV(av *AV)

func (*HV) FromHV

func (hv *HV) FromHV(hv2 *HV)

func (*HV) Get

func (hv *HV) Get(key Scalar) ScalarSlot

func (*HV) Put

func (hv *HV) Put(key Scalar) ScalarSlot

func (*HV) ToAV

func (hv *HV) ToAV() *AV

type ScBuffer

type ScBuffer []byte

func (ScBuffer) AppendTo

func (s ScBuffer) AppendTo(prefix []byte) []byte

func (ScBuffer) Bool

func (s ScBuffer) Bool() bool

func (ScBuffer) Bytes

func (s ScBuffer) Bytes() []byte

func (ScBuffer) Float

func (s ScBuffer) Float() float64

func (ScBuffer) Integer

func (s ScBuffer) Integer() int64

func (ScBuffer) IsBytes

func (ScBuffer) IsBytes() bool

func (ScBuffer) IsFloat

func (ScBuffer) IsFloat() bool

func (ScBuffer) Less

func (v ScBuffer) Less(s Scalar) bool

func (ScBuffer) String

func (s ScBuffer) String() string

func (ScBuffer) Type

func (ScBuffer) Type() Type

type ScFloat

type ScFloat float64

func (ScFloat) AppendTo

func (v ScFloat) AppendTo(prefix []byte) []byte

func (ScFloat) Bool

func (v ScFloat) Bool() bool

func (ScFloat) Bytes

func (v ScFloat) Bytes() []byte

func (ScFloat) Float

func (v ScFloat) Float() float64

func (ScFloat) Integer

func (v ScFloat) Integer() int64

func (ScFloat) IsBytes

func (ScFloat) IsBytes() bool

func (ScFloat) IsFloat

func (ScFloat) IsFloat() bool

func (ScFloat) Less

func (v ScFloat) Less(s Scalar) bool

func (ScFloat) String

func (v ScFloat) String() string

func (ScFloat) Type

func (ScFloat) Type() Type

type ScInt

type ScInt int64

func (ScInt) AppendTo

func (v ScInt) AppendTo(prefix []byte) []byte

func (ScInt) Bool

func (v ScInt) Bool() bool

func (ScInt) Bytes

func (v ScInt) Bytes() []byte

func (ScInt) Float

func (v ScInt) Float() float64

func (ScInt) Integer

func (v ScInt) Integer() int64

func (ScInt) IsBytes

func (ScInt) IsBytes() bool

func (ScInt) IsFloat

func (ScInt) IsFloat() bool

func (ScInt) Less

func (v ScInt) Less(s Scalar) bool

func (ScInt) String

func (v ScInt) String() string

func (ScInt) Type

func (ScInt) Type() Type

type ScModule

type ScModule struct {
	Name         string
	DisplayName  string
	Clid         uintptr
	ClassLoader  interface{} // *vm.ClassLoader
	ModuleObject interface{} // *vm.Module or nil
}

func AllocNewScModule

func AllocNewScModule(n string, clid uintptr, cl interface{}) *ScModule

func GetScModule

func GetScModule(sc Scalar) *ScModule

func (*ScModule) AppendTo

func (r *ScModule) AppendTo(prefix []byte) []byte

func (*ScModule) Bool

func (*ScModule) Bool() bool

func (*ScModule) Bytes

func (r *ScModule) Bytes() []byte

func (*ScModule) Float

func (r *ScModule) Float() float64

func (*ScModule) Integer

func (r *ScModule) Integer() int64

func (*ScModule) IsBytes

func (*ScModule) IsBytes() bool

func (*ScModule) IsFloat

func (r *ScModule) IsFloat() bool

func (*ScModule) Less

func (r *ScModule) Less(s Scalar) bool

func (*ScModule) String

func (r *ScModule) String() string

func (*ScModule) Type

func (r *ScModule) Type() Type

type ScReference

type ScReference struct {
	Refid uintptr

	Data interface{}

	Blessed *ScModule
}

func AllocScReference

func AllocScReference() *ScReference

func (*ScReference) AppendTo

func (r *ScReference) AppendTo(prefix []byte) []byte

func (*ScReference) Bool

func (*ScReference) Bool() bool

func (*ScReference) Bytes

func (r *ScReference) Bytes() []byte

func (*ScReference) Float

func (r *ScReference) Float() float64

func (*ScReference) Integer

func (r *ScReference) Integer() int64

func (*ScReference) IsBytes

func (*ScReference) IsBytes() bool

func (*ScReference) IsFloat

func (r *ScReference) IsFloat() bool

func (*ScReference) Less

func (r *ScReference) Less(s Scalar) bool

func (*ScReference) String

func (r *ScReference) String() string

func (*ScReference) Type

func (r *ScReference) Type() Type

type ScString

type ScString string

func (ScString) AppendTo

func (s ScString) AppendTo(prefix []byte) []byte

func (ScString) Bool

func (s ScString) Bool() bool

func (ScString) Bytes

func (s ScString) Bytes() []byte

func (ScString) Float

func (s ScString) Float() float64

func (ScString) Integer

func (s ScString) Integer() int64

func (ScString) IsBytes

func (ScString) IsBytes() bool

func (ScString) IsFloat

func (ScString) IsFloat() bool

func (ScString) Less

func (v ScString) Less(s Scalar) bool

func (ScString) String

func (s ScString) String() string

func (ScString) Type

func (ScString) Type() Type

type Scalar

type Scalar interface {
	Type() Type
	IsFloat() bool
	Integer() int64
	Float() float64
	IsBytes() bool
	String() string
	Bytes() []byte
	AppendTo(prefix []byte) []byte
	Less(s Scalar) bool
	Bool() bool
}

func Add

func Add(a, b Scalar) Scalar

func And

func And(a, b Scalar) Scalar

func Av_Index

func Av_Index(ref, idx Scalar) Scalar

func Bool2S

func Bool2S(b bool) Scalar

func Comp

func Comp(a, b Scalar) Scalar

func Concat

func Concat(a, b Scalar) Scalar

func Div

func Div(a, b Scalar) Scalar

func EQ

func EQ(a, b Scalar) Scalar

func ForceTrue

func ForceTrue(a Scalar) Scalar

func GE

func GE(a, b Scalar) Scalar

func GT

func GT(a, b Scalar) Scalar

func Hv_Curate

func Hv_Curate(s Scalar) Scalar

Curates a Scalar before being used as key in a HV. To ensure reproducible results, buffers, whichs content may change will be converted into strings before use.

func Hv_Index

func Hv_Index(ref, idx Scalar) Scalar

func LE

func LE(a, b Scalar) Scalar

func LT

func LT(a, b Scalar) Scalar

func Mod

func Mod(a, b Scalar) Scalar

func Mul

func Mul(a, b Scalar) Scalar

func NE

func NE(a, b Scalar) Scalar

func Null

func Null() Scalar

func Or

func Or(a, b Scalar) Scalar

func Sub

func Sub(a, b Scalar) Scalar

func UBitInv

func UBitInv(a Scalar) Scalar

func UMinus

func UMinus(a Scalar) Scalar

func UNot

func UNot(a Scalar) Scalar

func UPlus

func UPlus(a Scalar) Scalar

type ScalarSlot

type ScalarSlot interface {
	Get() Scalar
	Set(s Scalar)
}

func Av_IndexSlot

func Av_IndexSlot(ref, idx Scalar) ScalarSlot

func Hv_IndexSlot

func Hv_IndexSlot(ref, idx Scalar) ScalarSlot

func MakeScalarSlot

func MakeScalarSlot(a *Scalar) ScalarSlot

func NonSlot

func NonSlot() ScalarSlot

type Type

type Type uint
const (
	T_Nil Type = iota
	T_Integer
	T_Float
	T_String
	T_Buffer
	T_Reference
	T_Module
)

Jump to

Keyboard shortcuts

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