Files
ground-rewrite/src/Bytecode/Program/execute.c
2026-06-21 16:39:05 +10:00

19 lines
502 B
C

#include "../../../include/ground.h"
#include <stdint.h>
void _GroundBytecodeProgramExecute(GroundBytecodeProgram* program, GroundBytecodeHeap* heap) {
GroundSize i = 0;
while (i < program->len) {
int64_t status = Ground.Bytecode.Instruction.execute(&program->at[i], heap);
if (Ground.Flags.error) {
return;
}
switch (status) {
case -1: i++; break;
case -2: return;
default: i = status; break;
}
}
}