.include won't just inline files, but "project assemble" them as in the IDE#128
Open
ajccosta wants to merge 2 commits intorarsm:masterfrom
Open
.include won't just inline files, but "project assemble" them as in the IDE#128ajccosta wants to merge 2 commits intorarsm:masterfrom
ajccosta wants to merge 2 commits intorarsm:masterfrom
Conversation
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.
This is a QoL change. Before, one had to either open all files in the project (e.g., printf.s, printnum.s printstr.s to be able to run bottles.s) or had to declare all files in the command line like so: java -jar rars.jar bottles.s printf.s printnum.s printstr.s.
Doing a .include wouldn't fix this because includes used to just inline the whole file. This would lead to .text, .data, etc, conflicts which was a mess. Note, the problem wasn't something like declaring a variable twice, but was actually like declaring .text twice. The typical C, C++ pre-processors don't have these kinds of conflicts. We are also using this in an educational context and this was a pain.
This PR changes it so that .include does the same as if you had the included files open (in the IDE) or had given them to as command line arguments. It's probably a bit hacky. Hope it's helpful.
The assembleString path did not have these changes, meaning this PR would deprecate it (it leaves it with the previous behavior).