Skip to content

Fix unnecessary code generation.#366

Merged
dvander merged 1 commit intomasterfrom
fix-358
Sep 10, 2019
Merged

Fix unnecessary code generation.#366
dvander merged 1 commit intomasterfrom
fix-358

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
@dvander dvander deleted the fix-358 branch September 10, 2019 22:49
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.

1 participant