From 1c53304d03414890af0da7432d1aea87e754a14a Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Wed, 14 Oct 2026 08:29:46 +0330 Subject: feat: grow memory limits, add icon/actor libraries, overhaul LSP diagnostics Compiler and VM - make every memory map limit dynamic and adjustable at both build time and runtime, including compiler tables, stacks, and every execution region - reserve and grow tables, operand and return stacks, frame segments, and image-building output without relocating live code or globals - rename i/o and string helpers consistently (puts -> put_s, putn -> put_n, scat -> cat_s) across compiler, runtime, examples, tests, and docs - recast and consume values assigned to globals from inside functions - allow fixed and const together, add typed closure returns (fn:t(...)), multi-include syntax (include rt, run, core;), and recurse type inference - never infer string literals as word, anywhere, as argument, variable, or return type - draft docs/BORROW.md: a borrow checker less intrusive than Rust's but more intelligent LSP and editor integration - require explicit includes and give every toolchain area its own namespace (rt, lsp, run, core) - hover for built-in types, inferred types, values known at hover time, array and pointer lifetime/size, library names in include statements, and inferred lifetimes with explanations - honor /* */ comments as documentation for variables and arguments, and stop misattributing section headers or trailing comments as variable hints - stream diagnostics and cancel stale requests on change - jump to definition and references, including cross-file - quick fixes with automatic library import, and namespace completion Hints and diagnostics - render hints as blue squigglies by default, with hints on/small/off per file - suppress magic-number hints via a preceding /* */ comment, and say so - warn on unused arguments; allow multiple _ discards in parameters, pattern matching, and tagged enums, warning if a _ is actually used - rewrite hint and comment prose in professional compiler-doc register Libraries - add icon.zc: run-time self-modification, find/replace syntax, type and block edits, and step-through inspection of locals and globals - add actor.zc: async actors with Actor, implicit this, spawn/recv/send, injected into the compiler machinery at include time rather than built in Tooling and docs - reorganize sources, tests, and designs into subdirectories - unify windows entry points in tinyvm.bat and add a matching tinyvm.sh - add --help across the toolchain - polish the learning guide, stdlib docs, and design notes Tests - add accept, reject, and regression coverage across the compiler, LSP, - runtime, icon, actors, threads, formatting, and the toolchain contracts, plus fuzzers and property tests --- src/core/memmap.h | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) (limited to 'src/core/memmap.h') diff --git a/src/core/memmap.h b/src/core/memmap.h index b2ee787..cc768d4 100644 --- a/src/core/memmap.h +++ b/src/core/memmap.h @@ -1,29 +1,10 @@ -/* machine map, in words. the default has the code area, the compiler tables, - the genome and the stacks first (PW words in all) and the heap last: it - starts at PW and grows at run time, up to MW words of memory. MW is the - host's memory size; the array behind it is untouched until the heap grows - into it. a smaller board is a different build: src/tools/genmap writes a - directory whose memmap.h and genome agree, and the C cores are compiled - against that directory. do not edit the numbers by hand in one file only. - - include genome.h before this header when both are in the translation - unit. the linked image's GORG then wins; it has to be the same value - this header would have defined. - - PW is the first word past the initial stacks. emitted code can add heap - segments, and native code-address tables grow with those reservations. - MW bounds data addresses. a fixed map (HEAP_GROW 0) has MW == PW. - - DSLIM and RSLIM are the interpreter's stack checks. a straight-line - block can push about 1024 words after the check, which is why the data - limit sits 1100 words above DSLO. the genome's prologue checks the current frame segment and adds another - segment when needed. */ +/* generated by src/tools/genmap for the default profile. do not edit. */ #ifndef MEMMAP_H #define MEMMAP_H -#define PW 0x1C5000 +#define PW 0x1D5000 #define CODE_END 0x80000 -#define HEAP_LO 0x1C5000 -#define HEAP_HI 0x225000 +#define HEAP_LO 0x1D5000 +#define HEAP_HI 0x235000 #define HEAP_GROW 1 #ifndef MW #define MW 0x8000000 @@ -39,13 +20,13 @@ #else #define GORG 0x114100 #endif -#define FBOT 0x164100 -#define FTOP 0x1A4100 -#define RS0 0x1A4100 -#define MARK0 0x1B4100 +#define FBOT 0x174100 +#define FTOP 0x1B4100 +#define RS0 0x1B4100 +#define MARK0 0x1C4100 #define MARKN 0x8000 -#define DSLO 0x1BC100 -#define DSHI 0x1C4FF0 +#define DSLO 0x1CC100 +#define DSHI 0x1D4FF0 #define DS0 DSHI #define SYSGATE (ZFP + 2) #define DSLIM (DSLO + 1100) -- cgit v1.2.3