Skip to content

Lua for-loops - #42

Merged
msaljuk merged 1 commit into
mainfrom
lua-for-loops
May 29, 2026
Merged

msaljuk merged 1 commit into
mainfrom
lua-for-loops

Conversation

@msaljuk

@msaljuk msaljuk commented May 28, 2026

Copy link
Copy Markdown
Owner

Goes on top of #41 .

Only commit here is 8e8098c. We:

  • Add a new AST entry (and corresponding implementation in the pretty printer) to create Lua for-loops
  • Creates a utility function to extract for loop data from built-up while loop data (albeit with some functional but gross shadowing). Replaces the two while loop callsites with for-loops by default

This gives us huge wins - knocks off 10+ seconds for me on the buddy allocator. Silver Fulminate now clears C Fulminate even on my machine on the buddy allocator

- Adds a new Lua AST type to generate a for loop in Lua
- Adds a utility function to take parameters for a while loop and extract the corresponding for loop parameters
- Converts the two existing callsites for while loops to for loops by default
@msaljuk
msaljuk merged commit bc0cde1 into main May 29, 2026
20 checks 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.

1 participant