Skip to content

Move to LLVM based JIT#51

Merged
dvanhorn merged 79 commits into
mainfrom
next
May 27, 2026
Merged

Move to LLVM based JIT#51
dvanhorn merged 79 commits into
mainfrom
next

Conversation

@dvanhorn
Copy link
Copy Markdown
Member

This replaces the command line and file based backend for implementing asm-interp with a new implementation that uses LLVM's library for constructing assembly code in memory and its JIT facilities for running that code. It is significantly faster and requires minimal changes to existing code.

dvanhorn added 30 commits April 8, 2026 21:31
+ Use double quotes on label names to fix #40.
+ Provide a private parameter to control the os type when printing.
+ Ignore section tests until #43 is resolved.
Start of a new llvm-jit/ backend that assembles and executes x86 code
in-process using LLVM MC + ORC, eventaully to replace the external
clang/link/FFI pipeline. Includes a minimal C API, Makefile build,
Racket FFI wrapper, and install-time build hook with LLVM validation.
Make the runtime symbol definitions belong to the same per-run
ResourceTracker as the object file, so both get removed together after
the run.
Currently the runtime.o files have main.o linked in, which is probably
not the right design, but to keep things working with the langs code
as is, this commit adds a set_global operation and uses it to mutate
the existing globals in the runtime for things like in, out, heap,
etc.

At some point it would be better to remove main.o from runtime.o and
just set these symbols.
This change sets up the error handler function correctly and also
recovers gracefully from errors in executed code by starting up
a new jit interpreter.
dvanhorn and others added 29 commits May 7, 2026 20:11
Co-authored-by: dvanhorn <205413+dvanhorn@users.noreply.github.com>
Co-authored-by: dvanhorn <205413+dvanhorn@users.noreply.github.com>
Co-authored-by: dvanhorn <205413+dvanhorn@users.noreply.github.com>
@dvanhorn dvanhorn merged commit dfaa6cb into main May 27, 2026
18 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