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.
The changes in this PR do not noticeably improve the behavior of Epoch, LFC, or anything else, from the perspective of the user. This is because:
StringBuilder
s, and these changes don't change the quantity of generated code. They will make it possible to write to the file using less space, but this does not matter because after the first file write, the generated code gets duplicated in the process of removing line directives. Then, the second file write is never reached because GCC never finishes compiling.doGenerate
is called, it does not matter how much memory can be freed because if an out-of-memory error was ever going to occur, it probably would have happened already in the validator.Nonetheless, perhaps we should merge this branch anyway. I think the changes are consistent with best practices, and they give us two fewer things to worry about if we have more heap space problems in the future. Also, examination in a profiler seems to indicate that they have the desired effect on memory usage.
Other changes could be made, but I think we might defer them. These include: