Skip to content

feat(vm): String Concatenation#110

Merged
davydog187 merged 1 commit intomainfrom
feat/string-concatenation
Feb 8, 2026
Merged

feat(vm): String Concatenation#110
davydog187 merged 1 commit intomainfrom
feat/string-concatenation

Conversation

@davydog187
Copy link
Contributor

Wires up the .. operator end-to-end. The codegen was already emitting a :concatenate instruction but with the wrong shape (assumed consecutive registers) and the executor had no handler for it. This fixes the instruction to use two explicit source registers like every other binary op, and adds the executor handler with Lua's number-to-string coercion (1 .. 2"12").

Progress

  • 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

Add the .. operator to the VM with Lua's number-to-string coercion
semantics. Fixes the codegen to emit proper two-register operands and
adds the executor handler.
@davydog187 davydog187 merged commit 62fb7d9 into main Feb 8, 2026
2 checks passed
@davydog187 davydog187 deleted the feat/string-concatenation branch February 8, 2026 03:58
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