Lower literals/arithmetic/comparisons to Cranelift IR #81

Open
opened 2026-10-04 02:37:22 +00:00 by jacksonopp · 0 comments
Owner

Depends on #1 (subset) and #2 (Cranelift skeleton).

First real lowering issue: take a twill-check-checked fn body containing just literals and binary arithmetic/comparison ops (no bindings yet) and emit Cranelift IR for it.

  • JIT-compile and execute the result.
  • Assert the returned value matches what the expression should evaluate to.
  • Cover both Int and Bool-producing expressions, and at least one case per operator category (arithmetic, comparison).
Depends on #1 (subset) and #2 (Cranelift skeleton). First real lowering issue: take a `twill-check`-checked `fn` body containing just literals and binary arithmetic/comparison ops (no bindings yet) and emit Cranelift IR for it. - JIT-compile and execute the result. - Assert the returned value matches what the expression should evaluate to. - Cover both `Int` and `Bool`-producing expressions, and at least one case per operator category (arithmetic, comparison).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jacksonopp/twill#81
No description provided.