core/refactor: split main_loop into modules, simplify, rename#5644
Closed
jussisaurio wants to merge 1 commit intomainfrom
Closed
core/refactor: split main_loop into modules, simplify, rename#5644jussisaurio wants to merge 1 commit intomainfrom
jussisaurio wants to merge 1 commit intomainfrom
Conversation
fully AI generated. prompts used: 1. simplification - ran this about 5 times ``` make @core/translate/main_loop.rs simpler without changing semantics. if you cannot make it any simpler, just output: NO SIMPLIFICATIONS AVAILABLE. Focus on larger structural refactors and wins over small touchups and tidiness. The only success gate is: "make -C testing/runner run-rust" passes. no need for cargo build, cargo clippy, cargo fmt etc. ``` 2. splitting ``` split main_loop.rs into separate submodules (perhaps in a subdirectory) without changing semantics. focus on sharing similar concerns per file and orchestrating from parent module. The only success gate is: "make -C testing/runner run-rust" passes. no need for cargo build, cargo clippy, cargo fmt etc. ``` 3. simplification again a few times after the split 4. renaming: ``` read the modules in @core/translate/main_loop and rename any functions, structs or enums that do not accurately describe what they do. for example, if some function only handles hash join related logic but has a general name, it should explicitly mention hash joins. do this universally, not just for hash joins. ```
Collaborator
|
i love this so much... emitter.rs needs to be next |
Collaborator
|
closed by #5787 |
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.
fully AI generated. did this as an experiment, who knows if it's actually easier on the eyes :] draft for now while I evaluate whether I like this better
prompts used:
The main pervasive effect of this was a lot of new small helper functions which I think aids readability because you can get a better bird's-eye view of what a given routine does when it's not so much inline bytecode emission soup. Additionally, bigger functions with pattern-matches are often split by concern (e.g. scan / search / hash / multi-index have their own dedicated functions for initializing, and so on).
simplification again a few times after the split
renaming: