Files
ground-rewrite/src/Bytecode/Program/execute.c

18 lines
496 B
C
Raw Normal View History

2026-06-21 14:35:48 +10:00
#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;
}
}
}