logic

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 5 Imported by: 4

Documentation

Overview

Code generated during build process, along with langspec.json. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckProgram

func CheckProgram(program []byte, args [][]byte) error

CheckProgram performs basic program validation: instruction count and program cost Deprecated: Validation relies on metadata (`langspec.json`) that does not accurately represent opcode behavior across program versions. The behavior of `CheckProgram` relies on `langspec.json`. Thus, this method is being deprecated.

func ReadProgram added in v1.3.0

func ReadProgram(program []byte, args [][]byte) (ints []uint64, byteArrays [][]byte, err error)

ReadProgram is used to validate a program as well as extract found variables Deprecated: Validation relies on metadata (`langspec.json`) that does not accurately represent opcode behavior across program versions. The behavior of `ReadProgram` relies on `langspec.json`. Thus, this method is being deprecated.

Types

type SourceMap added in v1.18.0

type SourceMap struct {
	Version    int      `json:"version"`
	File       string   `json:"file,omitempty"`
	SourceRoot string   `json:"sourceRoot,omitempty"`
	Sources    []string `json:"sources"`
	Names      []string `json:"names"`
	Mappings   string   `json:"mappings"`
	// Decoded mapping results
	LineToPc map[int][]int
	PcToLine map[int]int
}

SourceMap provides a mapping of the source to assembled program

func DecodeSourceMap added in v1.18.0

func DecodeSourceMap(ism map[string]interface{}) (SourceMap, error)

func (*SourceMap) GetLineForPc added in v1.18.0

func (s *SourceMap) GetLineForPc(pc int) (int, bool)

func (*SourceMap) GetPcsForLine added in v1.18.0

func (s *SourceMap) GetPcsForLine(line int) []int

Jump to

Keyboard shortcuts

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