Skip to content

feat(vm): Closures#104

Merged
davydog187 merged 1 commit intomainfrom
closures
Feb 7, 2026
Merged

feat(vm): Closures#104
davydog187 merged 1 commit intomainfrom
closures

Conversation

@davydog187
Copy link
Contributor

@davydog187 davydog187 commented Feb 7, 2026

Implements function closures

  • Phase 0: Arithmetic operations and single return
  • Phase 1: Local variables with register assignment
  • Phase 2: Global variables (get_global, set_global)
  • Phase 3: Conditionals (if/elseif/else, and/or short-circuit)
  • Phase 4: Loops (while, repeat, numeric for)
  • Phase 5: Functions, closures, and upvalues
  • Phase 6: Tables and method calls
  • Phase 7: Native function calls (Lua→Elixir calling convention)
  • Phase 8: Generic for, varargs, and multiple returns
  • Phase 9: String concatenation and bitwise operations
  • Phase 10: Value encoding/decoding (Lua.VM.Value)
  • Phase 11: deflua integration (reimplement lib/lua.ex against VM.State)
  • Phase 12: Peephole optimizer
  • Phase 13: Remove Luerl dependency

- [x] Phase 0: Arithmetic operations and single return
- [x] Phase 1: Local variables with register assignment
- [x] Phase 2: Global variables (get_global, set_global)
- [x] Phase 3: Conditionals (if/elseif/else, and/or short-circuit)
- [x] Phase 4: Loops (while, repeat, numeric for)
- [x] Phase 5: Functions, closures, and upvalues
- [ ] Phase 6: Tables and method calls
- [ ] Phase 7: Native function calls (Lua→Elixir calling convention)
- [ ] Phase 8: Generic for, varargs, and multiple returns
- [ ] Phase 9: String concatenation and bitwise operations
- [ ] Phase 10: Value encoding/decoding (Lua.VM.Value)
- [ ] Phase 11: deflua integration (reimplement lib/lua.ex against VM.State)
- [ ] Phase 12: Peephole optimizer
- [ ] Phase 13: Remove Luerl dependency
@davydog187 davydog187 merged commit 491def6 into main Feb 7, 2026
2 checks passed
@davydog187 davydog187 deleted the closures branch February 7, 2026 22:59
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