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
merged 1 commit into from Sep 10, 2019
Merged

Fix unnecessary code generation. #366

merged 1 commit into from Sep 10, 2019

Conversation

dvander
Copy link
Member

@dvander dvander commented Sep 10, 2019

No description provided.

…embly.

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
check.

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

Bug: issue #358
Test: manual test
@dvander dvander merged commit 5735aa6 into master Sep 10, 2019
2 checks passed
@dvander dvander deleted the fix-358 branch Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant