umx_compiler

UMX virtual machine "Monkey" interpreter / bytecode compiler
git clone git://bsandro.tech/umx_compiler
Log | Files | Refs | README | LICENSE

opcode_string.go (845B)


      1 // Code generated by "stringer -type=Opcode"; DO NOT EDIT.
      2 
      3 package asm
      4 
      5 import "strconv"
      6 
      7 func _() {
      8 	// An "invalid array index" compiler error signifies that the constant values have changed.
      9 	// Re-run the stringer command to generate them again.
     10 	var x [1]struct{}
     11 	_ = x[CMOV-0]
     12 	_ = x[ARRI-1]
     13 	_ = x[ARRA-2]
     14 	_ = x[ADD-3]
     15 	_ = x[MUL-4]
     16 	_ = x[DIV-5]
     17 	_ = x[NOTA-6]
     18 	_ = x[HALT-7]
     19 	_ = x[ALLO-8]
     20 	_ = x[ABAN-9]
     21 	_ = x[OUTP-10]
     22 	_ = x[INP-11]
     23 	_ = x[LOAD-12]
     24 	_ = x[ORTH-13]
     25 }
     26 
     27 const _Opcode_name = "CMOVARRIARRAADDMULDIVNOTAHALTALLOABANOUTPINPLOADORTH"
     28 
     29 var _Opcode_index = [...]uint8{0, 4, 8, 12, 15, 18, 21, 25, 29, 33, 37, 41, 44, 48, 52}
     30 
     31 func (i Opcode) String() string {
     32 	if i >= Opcode(len(_Opcode_index)-1) {
     33 		return "Opcode(" + strconv.FormatInt(int64(i), 10) + ")"
     34 	}
     35 	return _Opcode_name[_Opcode_index[i]:_Opcode_index[i+1]]
     36 }