Utodev / DRC

A new compiler for DAAD adventure writer. For ZX Spectrum, Commodore 64, Amstrad CPC and PCW, MSX, MSX2, MSDOS, Amiga, Atari ST and HTML.
GNU General Public License v3.0
23 stars 8 forks source link

Ways to improve space saved when dumping tokens. #4

Closed Utodev closed 5 years ago

Utodev commented 5 years ago

Most people will use the built-in tokens, so there is a chance some token is unused. Make a first pass to find not used tokens, and delete them before making final compression.

Utodev commented 5 years ago

I have partially done this, but to avoid having to recalculate all token numbers, in case a given token it's not used, drb will be dumping it in the tokens table as a one-character-token. The interpreter won't use it anyway, as there is no text containing that token, so the toke text it's not important, but we will be saving as much bytes as the token legth minus 1.

I keep the issue open so I can go for the original target .