Add TCO for parser loops in JS bootstrapper, enable SX_USE_REF
The JS parser transpiled from parser.sx used tail-recursive functions (readStrLoop, skipWs, readListLoop, etc.) which overflow the stack on large inputs — the bootstrapper page highlights 100KB of Python and 143KB of JavaScript, producing 7620 spans in a 907KB response. The bootstrapper now detects zero-arg self-tail-recursive functions and emits them as while(true) loops with continue instead of recursive calls. Tested with 150K char strings and 8000 sibling elements. Also enables SX_USE_REF=1 in dev via x-dev-env anchor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
x-dev-env: &dev-env
|
||||
RELOAD: "true"
|
||||
WORKERS: "1"
|
||||
SX_USE_REF: "1"
|
||||
|
||||
x-sibling-models: &sibling-models
|
||||
# Every app needs all sibling __init__.py + models/ for cross-domain SQLAlchemy imports
|
||||
|
||||
Reference in New Issue
Block a user