Skip to content

use memo in recursive code generation - #1304

Merged
nicolas-abril merged 1 commit into
bendlang:mainfrom
toprameen:simplify-codegen-memo
Oct 4, 2026
Merged

nicolas-abril merged 1 commit into
bendlang:mainfrom
toprameen:simplify-codegen-memo

Conversation

@toprameen

Copy link
Copy Markdown
Contributor

emit_native and js_marshal now use the existing memo helper instead of repeating cache lookup and return logic. Both still cache the generated name before recursing, and native dependency registration still runs on every lookup.

Local checks: 83 byte-identical C, JS, and module outputs, plus seven matching missing-C-import diagnostics across 30 inputs. All 23 native macOS and 30 JS runs matched expected output. A module export round-tripped 50,000 recursive Nat fields and preserved its invalid-tag diagnostic. The local repository gate and git diff --check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants