mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
931388b687
* Virtual machine for the NEO blockhain. * fixed big.Int numeric operation pointer issue. * added appcall * Added README for vm package. * removed main.go * started VM cli (prompt) integration * added support for printing the stack. * moved cli to vm package * fixed vet errors * updated readme * added more test for VM and fixed some edge cases. * bumped version -> 0.37.0
25 lines
319 B
Go
25 lines
319 B
Go
package vm
|
|
|
|
// State of the VM.
|
|
type State uint
|
|
|
|
// Available States.
|
|
const (
|
|
noneState State = iota
|
|
haltState
|
|
faultState
|
|
breakState
|
|
)
|
|
|
|
func (s State) String() string {
|
|
switch s {
|
|
case haltState:
|
|
return "HALT"
|
|
case faultState:
|
|
return "FAULT"
|
|
case breakState:
|
|
return "BREAK"
|
|
default:
|
|
return "NONE"
|
|
}
|
|
}
|