LeStahL / tunguska

64k Demo by Team210 at Solskogen 2019
GNU General Public License v3.0
2 stars 0 forks source link

Improve Shader Compressor #32

Open LeStahL opened 5 years ago

LeStahL commented 5 years ago
LeStahL commented 5 years ago

Links:

LeStahL commented 5 years ago

I would like to have a "preserve-all-globals" option, that will cause the minifier to not touch any identifiers that are file-scope (because I use a link-time trick to save the symbols only once in the executable and need reliable prototypes for it.

LeStahL commented 5 years ago

I included the lexer I wrote today into a rudimentary compressor that only removes CRLF, comments and (some of the) spaces. All of these optimizations are lexer-based and do not require an actual AST. symbolize.py has been updated to include the compressor. AST-based optimizations are still possible though.