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:
parent
5c57391e5d
commit
bebe6dfda0
4 changed files with 45 additions and 0 deletions
14
src/vm.h
14
src/vm.h
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue