runtime

package
v0.0.0-...-ae3ae65 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	OpCharInt int32 = iota
	OpCharInc
	OpCharDec
	OpCharAdd
	OpCharSub
	OpCharEq
	OpCharNeq
	OpCharLess
	OpCharLessEq
	OpCharMore
	OpCharMoreEq
	OpCharToUpper
	OpCharToLower
	OpCharIsWhitespace
	OpCharIsLetter
	OpCharIsDigit
	OpCharIsUpper
	OpCharIsLower
	OpCharIsASCII

	OpIntChar
	OpIntFloat
	OpIntString
	OpIntNeg
	OpIntAbs
	OpIntInc
	OpIntDec
	OpIntAdd
	OpIntSub
	OpIntMul
	OpIntDiv
	OpIntMod
	OpIntExp
	OpIntEq
	OpIntNeq
	OpIntLess
	OpIntLessEq
	OpIntMore
	OpIntMoreEq
	OpIntIsZero

	OpFloatInt
	OpFloatString
	OpFloatNeg
	OpFloatAbs
	OpFloatInc
	OpFloatDec
	OpFloatAdd
	OpFloatSub
	OpFloatMul
	OpFloatDiv
	OpFloatMod
	OpFloatExp
	OpFloatEq
	OpFloatNeq
	OpFloatLess
	OpFloatLessEq
	OpFloatMore
	OpFloatMoreEq
	OpFloatIsPlusInf
	OpFloatIsMinusInf
	OpFloatIsInf
	OpFloatIsNan
	OpFloatSin
	OpFloatCos
	OpFloatTan
	OpFloatAsin
	OpFloatAcos
	OpFloatAtan
	OpFloatAtan2
	OpFloatSinh
	OpFloatCosh
	OpFloatTanh
	OpFloatAsinh
	OpFloatAcosh
	OpFloatAtanh
	OpFloatCeil
	OpFloatFloor
	OpFloatSqrt
	OpFloatCbrt
	OpFloatLog
	OpFloatHypot
	OpFloatGamma

	OpStringInt
	OpStringFloat

	OpError
	OpDump
)

Variables

View Source
var (
	Reductions = 0
	Stacks     = 0
	Shares     = 0
	Datas      = 0
	Thunks     = 0
	Structs    = 0
)
View Source
var OperatorString = [...]string{
	OpCharInt:          "char->int",
	OpCharInc:          "inc/char",
	OpCharDec:          "dec/char",
	OpCharAdd:          "+/char",
	OpCharSub:          "-/char",
	OpCharEq:           "==/char",
	OpCharNeq:          "!=/char",
	OpCharLess:         "</char",
	OpCharLessEq:       "<=/char",
	OpCharMore:         ">/char",
	OpCharMoreEq:       ">=/char",
	OpCharToUpper:      "upper/char",
	OpCharToLower:      "lower/char",
	OpCharIsWhitespace: "whitespace?/char",
	OpCharIsLetter:     "letter?/char",
	OpCharIsDigit:      "digit?/char",
	OpCharIsUpper:      "upper?/char",
	OpCharIsLower:      "lower?/char",
	OpCharIsASCII:      "ascii?/char",

	OpIntChar:   "int->char",
	OpIntFloat:  "int->float",
	OpIntString: "int->string",
	OpIntNeg:    "neg/int",
	OpIntAbs:    "abs/int",
	OpIntInc:    "inc/int",
	OpIntDec:    "dec/int",
	OpIntAdd:    "+/int",
	OpIntSub:    "-/int",
	OpIntMul:    "*/int",
	OpIntDiv:    "//int",
	OpIntMod:    "%/int",
	OpIntExp:    "^/int",
	OpIntEq:     "==/int",
	OpIntNeq:    "!=/int",
	OpIntLess:   "</int",
	OpIntLessEq: "<=/int",
	OpIntMore:   ">/int",
	OpIntMoreEq: ">=/int",
	OpIntIsZero: "zero?/int",

	OpFloatInt:        "float->int",
	OpFloatString:     "float->string",
	OpFloatNeg:        "neg/float",
	OpFloatAbs:        "abs/float",
	OpFloatInc:        "inc/float",
	OpFloatDec:        "dec/float",
	OpFloatAdd:        "+/float",
	OpFloatSub:        "-/float",
	OpFloatMul:        "*/float",
	OpFloatDiv:        "//float",
	OpFloatMod:        "%/float",
	OpFloatExp:        "^/float",
	OpFloatEq:         "==/float",
	OpFloatNeq:        "!=/float",
	OpFloatLess:       "</float",
	OpFloatLessEq:     "<=/float",
	OpFloatMore:       ">/float",
	OpFloatMoreEq:     ">=/float",
	OpFloatIsPlusInf:  "+inf?",
	OpFloatIsMinusInf: "-inf?",
	OpFloatIsInf:      "inf?",
	OpFloatIsNan:      "nan?",
	OpFloatSin:        "sin",
	OpFloatCos:        "cos",
	OpFloatTan:        "tan",
	OpFloatAsin:       "asin",
	OpFloatAcos:       "acos",
	OpFloatAtan:       "atan",
	OpFloatAtan2:      "atan2",
	OpFloatSinh:       "sinh",
	OpFloatCosh:       "cosh",
	OpFloatTanh:       "tanh",
	OpFloatAsinh:      "asinh",
	OpFloatAcosh:      "acosh",
	OpFloatAtanh:      "atanh",
	OpFloatCeil:       "ceil",
	OpFloatFloor:      "floor",
	OpFloatSqrt:       "sqrt",
	OpFloatCbrt:       "cbrt",
	OpFloatLog:        "log",
	OpFloatHypot:      "hypot",
	OpFloatGamma:      "gamma",

	OpStringInt:   "string->int",
	OpStringFloat: "string->float",

	OpError: "error",
	OpDump:  "dump",
}

Functions

This section is empty.

Types

type Char

type Char struct{ Value rune }

func (*Char) String

func (c *Char) String() string

type Code

type Code struct {
	Kind  CodeKind
	X     int32
	Table []Code
	Value Value
}

func (*Code) String

func (c *Code) String() string

type CodeKind

type CodeKind int32
const (
	CodeValue CodeKind = iota
	CodeOperator
	CodeMake
	CodeField
	CodeVar
	CodeGlobal
	CodeAbst
	CodeFastAbst
	CodeAppl
	CodeStrict
	CodeSwitch
)

type Float

type Float struct{ Value float64 }

func (*Float) String

func (f *Float) String() string

type Int

type Int struct{ Value big.Int }

func (*Int) String

func (i *Int) String() string

type Struct

type Struct struct {
	Index  int32
	Values []Value
}

func (*Struct) String

func (s *Struct) String() string

type Thunk

type Thunk struct {
	Result Value
	Code   *Code
	Data   []Value
}

func (*Thunk) String

func (t *Thunk) String() string

type Value

type Value interface {
	String() string
}

func Reduce

func Reduce(globals []Value, value Value, args ...Value) (result Value)

Jump to

Keyboard shortcuts

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