refactor: make interpreter portable with static pools and I/O hooks
Co-authored-by: aider (openrouter/moonshotai/kimi-k2.6) <aider@aider.chat>
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
// Configuration (all hard limits removed)
|
||||
#define MAX_NAME_LEN 31
|
||||
@@ -88,8 +87,11 @@ void inner_interpreter(void);
|
||||
void process_token(const char* token);
|
||||
void outer_interpreter(void);
|
||||
|
||||
// Ensure compile_buf has at least 'needed' free cells
|
||||
void ensure_compile_cap(int32_t needed);
|
||||
// Ensure compile_buf has at least 'needed' free cells (returns 0 on overflow)
|
||||
int ensure_compile_cap(int32_t needed);
|
||||
|
||||
Word* forth_alloc_word(void);
|
||||
Cell* forth_alloc_body(int32_t cells);
|
||||
|
||||
// Stack ops
|
||||
void do_dup(Word* w);
|
||||
|
||||
Reference in New Issue
Block a user