slige/runtime/arch.hpp
2024-11-08 12:22:42 +01:00

38 lines
558 B
C++

#pragma once
#include <cstdint>
namespace sliger {
// NOTICE: keep up to date with src/arch.ts
enum class Op : uint32_t {
Nop = 0,
PushNull = 1,
PushInt = 2,
PushString = 3,
PushArray = 4,
PushStruct = 5,
PushPtr = 6,
Pop = 7,
LoadLocal = 8,
StoreLocal = 9,
Call = 10,
Return = 11,
Jump = 12,
JumpIfNotZero = 13,
Add = 14,
Subtract = 15,
Multiply = 16,
Divide = 17,
Remainder = 18,
Equal = 19,
LessThan = 20,
And = 21,
Or = 22,
Xor = 23,
Not = 24,
};
}