go: cuelang.org/go/internal/core/runtime Index | Files

package runtime

import "cuelang.org/go/internal/core/runtime"


Package Files

build.go errors.go go.go imports.go index.go resolve.go runtime.go


var SharedRuntime = &Runtime{index: sharedIndex}

func RegisterBuiltin Uses

func RegisterBuiltin(importPath string, f PackageFunc)

type PackageFunc Uses

type PackageFunc func(ctx adt.Runtime) (*adt.Vertex, errors.Error)

type Runtime Uses

type Runtime struct {

    // Data holds the legacy index strut. It is for transitional purposes only.
    Data interface{}
    // contains filtered or unexported fields

A Runtime maintains data structures for indexing and resuse for evaluation.

func New Uses

func New() *Runtime

New creates a new Runtime. The builtins registered with RegisterBuiltin are available for

func (*Runtime) AddInst Uses

func (r *Runtime) AddInst(path string, key *adt.Vertex, p *build.Instance)

func (*Runtime) Build Uses

func (x *Runtime) Build(b *build.Instance) (v *adt.Vertex, errs errors.Error)

Build builds b and all its transitive dependencies, insofar they have not been build yet.

func (*Runtime) GetInstanceFromNode Uses

func (r *Runtime) GetInstanceFromNode(key *adt.Vertex) *build.Instance

func (*Runtime) GetNodeFromInstance Uses

func (r *Runtime) GetNodeFromInstance(key *build.Instance) *adt.Vertex

func (*Runtime) IndexToString Uses

func (r *Runtime) IndexToString(i int64) string

func (*Runtime) IsBuiltinPackage Uses

func (x *Runtime) IsBuiltinPackage(path string) bool

func (*Runtime) Label Uses

func (r *Runtime) Label(s string, isIdent bool) adt.Feature

func (*Runtime) LabelStr Uses

func (r *Runtime) LabelStr(l adt.Feature) string

func (*Runtime) LoadImport Uses

func (r *Runtime) LoadImport(importPath string) (*adt.Vertex, errors.Error)

func (*Runtime) LoadType Uses

func (x *Runtime) LoadType(t reflect.Type) (src ast.Expr, expr adt.Expr, ok bool)

func (*Runtime) ResolveFiles Uses

func (r *Runtime) ResolveFiles(p *build.Instance) (errs errors.Error)

func (*Runtime) StoreType Uses

func (x *Runtime) StoreType(t reflect.Type, src ast.Expr, expr adt.Expr)

func (*Runtime) StrLabel Uses

func (r *Runtime) StrLabel(str string) adt.Feature

func (*Runtime) StringToIndex Uses

func (r *Runtime) StringToIndex(s string) int64

Package runtime imports 13 packages (graph) and is imported by 8 packages. Updated 2021-01-26. Refresh now. Tools for package owners.