Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeProgram(vt *rt.GoType, compute func(*rt.GoType, ...interface{}) (interface{}, error), ...) (interface{}, error)
- func Error_marshaler(ret []byte, pos int) error
- func Error_number(number json.Number) error
- func Error_type(vtype reflect.Type) error
- func FindOrCompile(vt *rt.GoType, pv bool, ...) (interface{}, error)
- func FreeBuffer(p *bytes.Buffer)
- func FreeBytes(p *[]byte)
- func FreeStack(p *Stack)
- func GetProgram(vt *rt.GoType) interface{}
- func GoPanic(code int, val unsafe.Pointer)
- func IsSimpleByte(vt reflect.Type) bool
- func NewBuffer() *bytes.Buffer
- func NewBytes() *[]byte
- func ResetStack(p *Stack)
- type Encoder
- type Stack
- func (s *Stack) Cur() *State
- func (s *Stack) Drop() (int, uint64, unsafe.Pointer, unsafe.Pointer)
- func (s *Stack) Load() (int, uint64, unsafe.Pointer, unsafe.Pointer)
- func (s *Stack) Pop() State
- func (s *Stack) Push(v State) bool
- func (s *Stack) Save(x int, f uint64, p unsafe.Pointer, q unsafe.Pointer) bool
- func (s *Stack) Top() *State
- type State
Constants ¶
View Source
const ( MaxStack = 4096 // 4k states StackSize = unsafe.Sizeof(Stack{}) StateSize = int64(unsafe.Sizeof(State{})) StackLimit = MaxStack * StateSize )
View Source
const ( MAX_ILBUF = 100000 // cutoff at 100k of IL instructions MAX_FIELDS = 50 // cutoff at 50 fields struct )
View Source
const (
PanicNilPointerOfNonEmptyString int = 1 + iota
)
Variables ¶
View Source
var ( DebugSyncGC = os.Getenv("SONIC_SYNC_GC") != "" DebugAsyncGC = os.Getenv("SONIC_NO_ASYNC_GC") == "" DebugCheckPtr = os.Getenv("SONIC_CHECK_POINTER") != "" )
View Source
var ( ArgPtrs = []bool{true, true, true, false} LocalPtrs = []bool{} ArgPtrs_generic = []bool{true} LocalPtrs_generic = []bool{} )
View Source
var ( ByteType = reflect.TypeOf(byte(0)) JsonNumberType = reflect.TypeOf(json.Number("")) JsonUnsupportedValueType = reflect.TypeOf(new(json.UnsupportedValueError)) )
View Source
var ( ErrorType = reflect.TypeOf((*error)(nil)).Elem() JsonMarshalerType = reflect.TypeOf((*json.Marshaler)(nil)).Elem() EncodingTextMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() )
View Source
var ERR_nan_or_infinite = &json.UnsupportedValueError{ Str: "NaN or ±Infinite", Value: reflect.ValueOf("NaN or ±Infinite"), }
View Source
var ERR_too_deep = &json.UnsupportedValueError{ Str: "Value nesting too deep", Value: reflect.ValueOf("..."), }
View Source
var UseVM = os.Getenv("SONIC_ENCODER_USE_VM") != ""
Functions ¶
func ComputeProgram ¶
func Error_marshaler ¶
func Error_number ¶
func Error_type ¶
func FindOrCompile ¶
func FreeBuffer ¶
func GetProgram ¶
func IsSimpleByte ¶
func ResetStack ¶
func ResetStack(p *Stack)
Types ¶
Click to show internal directories.
Click to hide internal directories.