progress
This commit is contained in:
17
src/Bytecode/Program/execute.c
Normal file
17
src/Bytecode/Program/execute.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "../../../include/ground.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void _GroundBytecodeProgramExecute(GroundBytecodeProgram* program, GroundBytecodeHeap* heap) {
|
||||
for (GroundSize i = 0; i < program->len; i++) {
|
||||
int64_t status = Ground.Bytecode.Instruction.execute(&program->at[i], heap);
|
||||
if (Ground.Flags.error) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
case -1: break;
|
||||
case -2: return;
|
||||
default: i = status; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
5
src/Bytecode/Program/optimise.c
Normal file
5
src/Bytecode/Program/optimise.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "../../../include/ground.h"
|
||||
|
||||
void _GroundBytecodeProgramOptimise(GroundBytecodeProgram* program) {
|
||||
// TODO: Implement optimisation
|
||||
}
|
||||
Reference in New Issue
Block a user