mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 17:06:04 +00:00
The v0.1 calling convention passes parameters through four fixed zero-page slots ($04-$07). Functions declared with 5+ parameters were silently dropped past the 4th, producing a runtime miscompile with no compile-time signal — a trap I hit while building the War example (arm_fly took 6 params and silently corrupted fly_card and fly_face_up). Add E0506 to the analyzer so the over-arity case becomes a clear compile-time error pointing at the user's `fun` declaration with guidance toward globals or splitting. New tests cover both the 5- param rejection and the 4-param accept boundary. Documented in examples/war/COMPILER_BUGS.md §1, language-guide.md "Restrictions" section, and the error code table. https://claude.ai/code/session_0143dTgh3UeRrtfHgQwzcv5z |
||
|---|---|---|
| .. | ||
| architecture.md | ||
| future-work.md | ||
| language-guide.md | ||
| nes-reference.md | ||
| platformer.gif | ||