Skip to content

Commit fcd8f7f

Browse files
committed
Merge branch 'feat/big-strings'
2 parents c0574ca + 566614e commit fcd8f7f

8 files changed

Lines changed: 1050 additions & 265 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
## Changelog
22

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+
327
### MAPLOAD — JSON map loader (2026-04-27)
428

529
New `MAPLOAD path$` statement implements `docs/map-format.md` v1

0 commit comments

Comments
 (0)