op

package
v2.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package op defines the opcodes that are used in the Tamarin virtual machine.

Index

Constants

This section is empty.

Variables

View Source
var OperandCount = make([]Info, 256)

Functions

This section is empty.

Types

type BinaryOpType

type BinaryOpType uint16
const (
	Add BinaryOpType = iota
	Subtract
	Multiply
	Divide
	Modulo
	And
	Or
	Xor
	Power
	LShift
	RShift
	BitwiseAnd
	BitwiseOr
)

type Code

type Code uint16
const (
	Nop Code = iota
	BinaryOp
	BinarySubscr
	BuildList
	BuildMap
	BuildSet
	BuildString
	Call
	CompareOp
	ContainsOp
	Copy
	DeleteSubscr
	False
	ForIter
	GetIter
	Halt
	Import
	JumpBackward
	JumpForward
	Length
	LoadAttr
	LoadBuiltin
	LoadClosure
	LoadConst
	LoadFast
	LoadFree
	LoadGlobal
	LoadName
	MakeCell
	Nil
	Partial
	PopJumpBackwardIfFalse
	PopJumpBackwardIfTrue
	PopJumpForwardIfFalse
	PopJumpForwardIfTrue
	PopTop
	Print
	PushNil
	Range
	ReturnValue
	Slice
	StoreAttr
	StoreFast
	StoreFree
	StoreGlobal
	StoreName
	StoreSubscr
	Swap
	True
	UnaryInvert
	UnaryNegative
	UnaryNot
	UnaryPositive
	Unpack
)

type CompareOpType

type CompareOpType uint16
const (
	LessThan CompareOpType = iota
	LessThanOrEqual
	Equal
	NotEqual
	GreaterThan
	GreaterThanOrEqual
)

type Info

type Info struct {
	Name          string
	OperandCount  int
	OperandWidths []int
}

func GetInfo

func GetInfo(op Code) Info

Jump to

Keyboard shortcuts

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