|
1 | 1 | ## Changelog |
2 | 2 |
|
| 3 | +### Big strings — length-prefixed heap-backed strings (2026-05-17) |
| 4 | + |
| 5 | +`struct value` now carries an `rgc_str_t *str_h` instead of an inline |
| 6 | +`char str[MAX_STR_LEN]`. Strings are refcounted, length-prefixed, |
| 7 | +NUL-safe heap allocations. See `docs/big-string-plan.md`. |
| 8 | + |
| 9 | +Effects: |
| 10 | + |
| 11 | +- `HTTP$()`, `JSON$()`, `INPUT$()`, file reads no longer truncate at |
| 12 | + 4 KB. |
| 13 | +- Embedded NULs round-trip across concat, `MID$`, comparisons, file |
| 14 | + I/O (`"A\0B" + "C\0D"` is now `LEN = 6`). |
| 15 | +- `struct value` shrinks ~4116 → ~24 bytes; locals, arrays, |
| 16 | + `data_items`, UDF saved params all get proportionally cheaper. |
| 17 | +- `#OPTION MAXSTR UNLIMITED` (also `NONE`/`OFF`/`0`) lifts the cap; |
| 18 | + default stays 4096 for portability. CLI: `-maxstr unlimited`. |
| 19 | +- Per-statement temp ring catches transient allocations; refcount |
| 20 | + bumps on slot assignment, drains balance. |
| 21 | + |
| 22 | +Surface is unchanged — zero `.bas` edits required. New tests: |
| 23 | +`tests/bigstring_nul.bas`, `tests/bigstring_grow.bas`, |
| 24 | +`tests/bigstring_refcount.bas`. All existing `.bas` tests still |
| 25 | +green; ASAN run on the full suite is clean. |
| 26 | + |
3 | 27 | ### MAPLOAD — JSON map loader (2026-04-27) |
4 | 28 |
|
5 | 29 | New `MAPLOAD path$` statement implements `docs/map-format.md` v1 |
|
0 commit comments