persist

package
v2.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToProgram

func ToProgram(frame ProgramFrame) (*bytecode.Program, error)

Types

type AggregatePlanFrame

type AggregatePlanFrame struct {
	Keys             []string `json:"keys,omitempty" msgpack:"keys,omitempty"`
	Kinds            []int    `json:"kinds,omitempty" msgpack:"kinds,omitempty"`
	TrackGroupValues bool     `json:"trackGroupValues,omitempty" msgpack:"trackGroupValues,omitempty"`
}

type CatchFrame

type CatchFrame struct {
	StartPC   int `json:"startPC" msgpack:"startPC"`
	EndPC     int `json:"endPC" msgpack:"endPC"`
	HandlerPC int `json:"handlerPC" msgpack:"handlerPC"`
}

type ConstantFrame

type ConstantFrame struct {
	Bool     *bool    `json:"bool,omitempty" msgpack:"bool,omitempty"`
	Int      *int64   `json:"int,omitempty" msgpack:"int,omitempty"`
	Float    *float64 `json:"float,omitempty" msgpack:"float,omitempty"`
	String   *string  `json:"string,omitempty" msgpack:"string,omitempty"`
	DateTime *string  `json:"datetime,omitempty" msgpack:"datetime,omitempty"`
	Type     string   `json:"type" msgpack:"type"`
	Binary   []byte   `json:"binary,omitempty" msgpack:"binary,omitempty"`
}

type FunctionsFrame

type FunctionsFrame struct {
	Host        []HostFunctionFrame `json:"host,omitempty" msgpack:"host,omitempty"`
	UserDefined []UDFFrame          `json:"userDefined,omitempty" msgpack:"userDefined,omitempty"`
}

type HostFunctionFrame

type HostFunctionFrame struct {
	Name  string `json:"name" msgpack:"name"`
	Arity int    `json:"arity" msgpack:"arity"`
}

type InstructionFrame

type InstructionFrame struct {
	Opcode   uint8    `json:"opcode" msgpack:"opcode"`
	Operands [3]int64 `json:"operands" msgpack:"operands"`
}

type LabelFrame

type LabelFrame struct {
	Name string `json:"name" msgpack:"name"`
	PC   int    `json:"pc" msgpack:"pc"`
}

type MetadataFrame

type MetadataFrame struct {
	Labels                 []LabelFrame         `json:"labels,omitempty" msgpack:"labels,omitempty"`
	CompilerVersion        string               `json:"compilerVersion,omitempty" msgpack:"compilerVersion,omitempty"`
	AggregatePlans         []AggregatePlanFrame `json:"aggregatePlans,omitempty" msgpack:"aggregatePlans,omitempty"`
	AggregateSelectorSlots []int                `json:"aggregateSelectorSlots,omitempty" msgpack:"aggregateSelectorSlots,omitempty"`
	MatchFailTargets       []int                `json:"matchFailTargets,omitempty" msgpack:"matchFailTargets,omitempty"`
	DebugSpans             []SpanFrame          `json:"debugSpans,omitempty" msgpack:"debugSpans,omitempty"`
	OptimizationLevel      int                  `json:"optimizationLevel" msgpack:"optimizationLevel"`
}

type ProgramFrame

type ProgramFrame struct {
	ISAVersion *int                `json:"isaVersion" msgpack:"isaVersion"`
	Registers  *int                `json:"registers" msgpack:"registers"`
	Bytecode   *[]InstructionFrame `json:"bytecode" msgpack:"bytecode"`
	Source     *SourceFrame        `json:"source,omitempty" msgpack:"source,omitempty"`
	Functions  FunctionsFrame      `json:"functions" msgpack:"functions"`
	Constants  []ConstantFrame     `json:"constants,omitempty" msgpack:"constants,omitempty"`
	CatchTable []CatchFrame        `json:"catchTable,omitempty" msgpack:"catchTable,omitempty"`
	Params     []string            `json:"params,omitempty" msgpack:"params,omitempty"`
	Metadata   MetadataFrame       `json:"metadata" msgpack:"metadata"`
}

func FromProgram

func FromProgram(program *bytecode.Program) (ProgramFrame, error)

type SourceFrame

type SourceFrame struct {
	Name string `json:"name,omitempty" msgpack:"name,omitempty"`
	Text string `json:"text" msgpack:"text"`
}

type SpanFrame

type SpanFrame struct {
	Start int `json:"start" msgpack:"start"`
	End   int `json:"end" msgpack:"end"`
}

type UDFFrame

type UDFFrame struct {
	Name        string `json:"name" msgpack:"name"`
	DisplayName string `json:"displayName,omitempty" msgpack:"displayName,omitempty"`
	Entry       int    `json:"entry" msgpack:"entry"`
	Registers   int    `json:"registers" msgpack:"registers"`
	Params      int    `json:"params" msgpack:"params"`
}

Jump to

Keyboard shortcuts

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