Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodePrinter ¶
type Function ¶
type Function[E any] struct { Name string QualifiedName string Code []E ParameterCount uint16 TypeParameterCount uint16 LocalCount uint16 TypeIndex uint16 LineNumbers LineNumberTable }
func (Function[E]) IsAnonymous ¶
type InstructionProgram ¶
type InstructionProgram = Program[opcode.Instruction, StaticType]
type LineNumberTable ¶
type LineNumberTable struct {
Positions []PositionInfo
}
LineNumberTable holds the instruction-index to source-position mapping. It only maintains an entry for an instruction only if the position info got changed during that instruction. i.e: If multiple consecutive instructions were emitted for the same source-code position, then only the first instruction of that instruction-set would be available in the table.
func (*LineNumberTable) AddPositionInfo ¶
func (t *LineNumberTable) AddPositionInfo(bytecodeIndex uint16, position Position)
func (*LineNumberTable) GetSourcePosition ¶
func (t *LineNumberTable) GetSourcePosition(instructionIndex uint16) Position
type Position ¶
func (Position) EndPosition ¶
func (p Position) EndPosition(_ common.MemoryGauge) ast.Position
func (Position) StartPosition ¶
type PositionInfo ¶
type ProgramPrinter ¶
type ProgramPrinter[E, T any] struct { // contains filtered or unexported fields }
func NewBytecodeProgramPrinter ¶
func NewBytecodeProgramPrinter(resolve bool, colorize bool) *ProgramPrinter[byte, []byte]
func NewInstructionsProgramPrinter ¶
func NewInstructionsProgramPrinter(resolve bool, colorize bool) *ProgramPrinter[opcode.Instruction, StaticType]
func (*ProgramPrinter[E, T]) PrintProgram ¶
func (p *ProgramPrinter[E, T]) PrintProgram(program *Program[E, T]) string
type StaticType ¶
type StaticType = interpreter.StaticType
type TypeDecoder ¶
type TypeDecoder[T any] func(bytes T) (StaticType, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.