Repository navigation
Pin Fe master and remove transact_in - #21
Merged
Merged
Conversation
Fe's "Grow native buffers in place with `realloc`" resizes buffers past 1032 bytes with C's `realloc`, which a program that replaces `malloc` and `free` must replace too. With it, the CLI smoke's owned-output check aborted in glibc's `realloc` on this allocator's blocks. Resize by allocating, copying and releasing, which counts as before.
Fe master now pins Sonatina 5632dd63, which builds a moved `Transaction` in place (fe-lang/sonatina#534), and grows native buffers with `realloc` (argotorg/fe#1983). Pin it, its Cargo.lock and its Sonatina revision.
The conformance driver kept one Transaction and loaded each run's world into it, because moving the world and buffers through `transact` cost ~17% of a transfer. With Sonatina building the Transaction in place, reading the lent buffers in place and folding `Buffers::new()`, the driver runs the documented `transact`, and `transact_in` and `Transaction::load` go.
`apply` replaced the lent buffers with `Buffers::new()` to move them into the Transaction, and `Session::apply` replaced its world with `WorldState::empty()`. Both are `mut` places, which can be moved out of when reinitialized before returning, so move them and restore them instead. `Session::apply` returns the receipt.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Pins Fe master
aa0a5d806and its Sonatina,5632dd63.Sonatina now builds a moved
Transactionin place (fe-lang/sonatina#534), so the conformance driver calls the documentedtransactandtransact_inandTransaction::loadgo.applyandSession::applymove the buffers and world out and back instead of swapping inBuffers::new()andWorldState::empty()placeholders;Session::applyreturns the receipt.Fe's growable buffers now grow with
realloc(argotorg/fe#1983), so the VM test allocator implements it.A transfer runs about 200 more instructions than with the held
Transaction(3,368 vs 3,164): moving the world and buffers in and out.