Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnecessary code generation. #366

merged 1 commit into from
Sep 10, 2019

Fix unnecessary code generation. #366

merged 1 commit into from
Sep 10, 2019


Copy link

@dvander dvander commented Sep 10, 2019

No description provided.


The two-pass system in the compiler is able to roughly guess which
functions are not used, but it's a poor guess. Stocks called by other
stocks, including recursive functions, all get compiled in. We can fix
this by traversing the call graph to determine the actual live set.

Note, the assembler now skips functions with uDEFINED but not uPUBLIC.
uDEFINED is cleared by delete_symbols, so it looks like a pointless

This patch shaves about 10% off some .smx files sampled from the
SourceMod tree.

Bug: issue #358
Test: manual test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant