90 lines
2.2 KiB
C#
90 lines
2.2 KiB
C#
namespace Qrakhen.Qamp.Core.Execution;
|
|
|
|
public enum OpCode
|
|
{
|
|
F_Mask = 0xF0,
|
|
|
|
None = 0x00,
|
|
Constant = 0x01,
|
|
Null = 0x02,
|
|
Pop = 0x03,
|
|
Cast = 0x04,
|
|
|
|
False = 0x0e,
|
|
True = 0x0f,
|
|
|
|
Val = 0x10,
|
|
Ref = 0x11,
|
|
|
|
SetGlobal = 0x20,
|
|
GetGlobal = 0x21,
|
|
GetLocal = 0x22,
|
|
SetLocal = 0x23,
|
|
GetOuter = 0x24,
|
|
SetOuter = 0x25,
|
|
GetMember = 0x26,
|
|
SetMember = 0x27,
|
|
|
|
DefineGlobal = 0x30,
|
|
CloseOuter = 0x31,
|
|
|
|
AssignValue = 0x40, // unsure
|
|
AssignReference = 0x41, // unsure
|
|
|
|
F_Operation = 0x60,
|
|
Add = 0x60,
|
|
Subtract = 0x61,
|
|
Multiply = 0x62,
|
|
Divide = 0x63,
|
|
Modulo = 0x64,
|
|
BitwiseAnd = 0x65,
|
|
BitwiseOr = 0x66,
|
|
BitwiseXor = 0x67,
|
|
BitwiseLeft = 0x68,
|
|
BitwiseRight = 0x69,
|
|
F_Unary = 0x0a,
|
|
Not = 0x6a,
|
|
Negate = 0x6b,
|
|
BitwiseNot = 0x6c,
|
|
|
|
F_Compare = 0x50,
|
|
Equal = 0x50,
|
|
Greater = 0x51,
|
|
Less = 0x52,
|
|
|
|
Increment = 0x70, // basically increment by, ++ simply 'makes up' the 1.
|
|
Decrement = 0x71, // same here broren min
|
|
|
|
Array = 0xc0,
|
|
List = 0xc1,
|
|
Structure = 0xc2,
|
|
GetItem = 0xc3,
|
|
SetItem = 0xc4,
|
|
AddItem = 0xc5,
|
|
RemoveItem = 0xc6,
|
|
|
|
Return = 0x80,
|
|
Jump = 0x81,
|
|
JumpIfFalse = 0x82,
|
|
Loop = 0x83,
|
|
Invoke = 0x84,
|
|
InvokeBase = 0x85,
|
|
InvokeMember = 0x86,
|
|
Context = 0x87,
|
|
|
|
Class = 0xa0,
|
|
Member = 0xa1,
|
|
Base = 0xa2,
|
|
Inherit = 0xa3,
|
|
Method = 0xa4,
|
|
Static = 0xa5,
|
|
|
|
Print = 0xe0,
|
|
PrintStack = 0xe1,
|
|
PrintGlobals = 0xe2,
|
|
PrintExpr = 0xe3,
|
|
Typeof = 0xef,
|
|
|
|
Export = 0xfe, // probably shouldnt be an op code but rather be done during digestion
|
|
Import = 0xff, // probably shouldnt be an op code but rather be done during digestion
|
|
} |