1
0
Fork 0
forked from fun/fun

Made MAX_FRAMES, MAX_FRAME_LOCALS, MAX_GLOBALS, OUTPUT_SIZE and STACK_SIZE configurable during build configuration using cmake defines (-D). No code changes. (0.40.5)

This commit is contained in:
Johannes Findeisen 2026-04-10 22:04:27 +02:00
commit bebe6dfda0
4 changed files with 45 additions and 0 deletions

View file

@ -13,11 +13,25 @@
#include "bytecode.h"
#include <stddef.h>
#ifndef MAX_FRAMES
#define MAX_FRAMES 128
#endif
#ifndef MAX_FRAME_LOCALS
#define MAX_FRAME_LOCALS 64
#endif
#ifndef MAX_GLOBALS
#define MAX_GLOBALS 128
#endif
#ifndef OUTPUT_SIZE
#define OUTPUT_SIZE 1024
#endif
#ifndef STACK_SIZE
#define STACK_SIZE 1024
#endif
static const char *opcode_names[] = {
"NOP", "LOAD_CONST", "LOAD_LOCAL", "STORE_LOCAL",