Compile structs in LLVM backend#12
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…m_this on Value Groundwork for the LLVM compiler runtime: compiled code needs to recover shared_ptr ownership from raw Value pointers, reuse builtin/method execute paths with pre-evaluated arguments, and expand imports outside run(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
extern "C" rt_* shims over the existing Value/SymbolTable machinery, with arena-frame lifetime tracking and a CompiledAlgoValue that bridges native function pointers into the interpreter's call protocol. Runtime errors print the interpreter's top-level message and exit(1). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Lowers the AST to LLVM IR with all operations dispatched to the rt_* runtime, optimizes at O2, emits a native object file, and links it against libpseudort.a. Loops get per-iteration arena frames; for-loops keep the latest loop variable alive in a dedicated frame. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shares the interpreter's is_memoizable_numeric_algo analysis (now in src/analysis.h) so compiled recursive numeric algorithms get the same by-argument caching. Documents the compile workflow in the README and makes the clang-tidy CI script tolerate missing LLVM headers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… files Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Tests: