1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use ;
/// `Bytecode`: Represents instructions the built in Resurgence VM can use (this can be reused for any VM)
///
/// Possible Values:
/// * `Alloc(u32)`: Preallocates memory in the vector stored in a `StackFrame` object
/// * `Free(u32)`: Pops n amount of `StackFrame` objects
/// * `Jump(i64)`: Jumps n amount of operations
/// * `Call(u64)`: Jumps to index n by doing a recursive call of the execute_butecode function
/// * `CCall(String)`: Calls a C API function
/// * `Mov(Register, RegisterReference, Register, RegisterReference)`: Moves from one register to another
/// * `Cpy(Register, RegisterReference, Register, RegisterReference)`: Copies a value from one register to another
/// * `Ref(Register, RegisterReference, Register, RegisterReference)`: Stores the address of a register to another
/// * `Add(Register, Register, Register)`: Adds 2 registers and stores it in the output
/// * `Sub(Register, Register, Register)`: Subtracts 2 registers and stores it in the output
/// * `Mul(Register, Register, Register)`: Multiples 2 registers and stores it in the output
/// * `Div(Register, Register, Register)`: Divides 2 registers and stores it in the output
/// * `Equal(Register, Register)`: Checks if 2 registers are equal and jumps one operation if the condition is `true`
/// * `NotEqual(Register, Register)`: Checks if 2 registers are not equal and jumps one operation if the condition is `true`
/// * `Greater(Register, Register)`: Checks if one register is greater then another and jumps one operation if the condition is `true`
/// * `Less(Register, Register)`: Checks if one register is less then another and jumps one operation if the condition is `true`
/// * `GreaterEqual(Register, Register)`: Checks if one register is greater than or equal to another and jumps one operation if the condition is `true`
/// * `LessEqual(Register, Register)`: Checks if one register is less than or equal to another and jumps one operation if the condition is `true`