Documentation ¶
Index ¶
- Constants
- func DecodeBytecodeFrom(r io.Reader, modules *gad.ModuleMap) (*gad.Bytecode, error)
- func DecodeObject(r io.Reader) (gad.Object, error)
- func EncodeBytecodeTo(bc *gad.Bytecode, w io.Writer) error
- type Array
- type Bool
- type BuiltinFunction
- type BuiltinObjType
- type Bytecode
- type Bytes
- type Char
- type CompiledFunction
- type Decimal
- type Flag
- type Float
- type Function
- type Int
- type Map
- type NilType
- type SourceFile
- type SourceFileSet
- type String
- type Symbol
- type SyncMap
- type Uint
Constants ¶
const ( BytecodeSignature uint32 = 0x75474F BytecodeVersion uint16 = 1 )
Bytecode signature and version are written to the header of encoded Bytecode. Bytecode is encoded with current BytecodeVersion and its format.
Variables ¶
This section is empty.
Functions ¶
func DecodeBytecodeFrom ¶
DecodeBytecodeFrom decodes *gad.Bytecode from given r io.Reader.
func DecodeObject ¶
DecodeObject decodes and returns Object from a io.Reader which is encoded with MarshalBinary.
Types ¶
type Array ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Array) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Array) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Bool ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Bool) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Bool) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type BuiltinFunction ¶
type BuiltinFunction gad.BuiltinFunction
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*BuiltinFunction) MarshalBinary ¶
func (o *BuiltinFunction) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*BuiltinFunction) UnmarshalBinary ¶
func (o *BuiltinFunction) UnmarshalBinary(data []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type BuiltinObjType ¶
type BuiltinObjType gad.BuiltinObjType
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*BuiltinObjType) MarshalBinary ¶
func (o *BuiltinObjType) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*BuiltinObjType) UnmarshalBinary ¶
func (o *BuiltinObjType) UnmarshalBinary(data []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Bytecode ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*Bytecode) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Bytecode) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler Do not use this method if builtin modules are used, instead use Decode method.
type Bytes ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Bytes) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Bytes) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Char ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Char) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Char) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type CompiledFunction ¶
type CompiledFunction gad.CompiledFunction
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*CompiledFunction) MarshalBinary ¶
func (o *CompiledFunction) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*CompiledFunction) UnmarshalBinary ¶
func (o *CompiledFunction) UnmarshalBinary(data []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Decimal ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Decimal) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Decimal) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Flag ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Flag) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Flag) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Float ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Float) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Float) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Function ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*Function) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Function) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Int ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Int) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Int) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Map ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Map) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Map) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type NilType ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*NilType) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*NilType) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type SourceFile ¶
type SourceFile parser.SourceFile
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*SourceFile) MarshalBinary ¶
func (sf *SourceFile) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*SourceFile) UnmarshalBinary ¶
func (sf *SourceFile) UnmarshalBinary(data []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type SourceFileSet ¶
type SourceFileSet parser.SourceFileSet
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*SourceFileSet) MarshalBinary ¶
func (sfs *SourceFileSet) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*SourceFileSet) UnmarshalBinary ¶
func (sfs *SourceFileSet) UnmarshalBinary(data []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type String ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (String) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*String) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Symbol ¶
type Symbol gad.SymbolInfo
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Symbol) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Symbol) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type SyncMap ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (*SyncMap) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*SyncMap) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type Uint ¶
Types implementing encoding.BinaryMarshaler encoding.BinaryUnmarshaler.
func (Uint) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Uint) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler