mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 22:46:30 +00:00
37 lines
534 B
C++
37 lines
534 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,
|
|
PushBool = 3,
|
|
PushString = 4,
|
|
PushPtr = 5,
|
|
Pop = 6,
|
|
LoadLocal = 7,
|
|
StoreLocal = 8,
|
|
Call = 9,
|
|
Return = 10,
|
|
Jump = 11,
|
|
JumpIfFalse = 12,
|
|
Add = 13,
|
|
Subtract = 14,
|
|
Multiply = 15,
|
|
Divide = 16,
|
|
Remainder = 17,
|
|
Equal = 18,
|
|
LessThan = 19,
|
|
And = 20,
|
|
Or = 21,
|
|
Xor = 22,
|
|
Not = 23,
|
|
};
|
|
|
|
}
|