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

Suggested abbreviation doesn't save characters #152

Open
fredrikr opened this issue Feb 8, 2022 · 2 comments
Open

Suggested abbreviation doesn't save characters #152

fredrikr opened this issue Feb 8, 2022 · 2 comments

Comments

@fredrikr
Copy link

fredrikr commented Feb 8, 2022

My game contains a lot of backslashes in strings, written as @@92. When compiling with -u the compiler says I should abbreviate this (Abbreviate "@@92";). When compiling the game, the compiler warns (correctly) that this abbreviation doesn't save any characters.

I used compiler version 6.36 with $MAX_ABBREVS=96.

@erkyrath
Copy link
Contributor

erkyrath commented Feb 9, 2022

It's clear that the optimizer is not taking @-escapes into account when computing scores.

I'm afraid the optimizer code is pretty opaque to me.

@erkyrath
Copy link
Contributor

erkyrath commented Aug 3, 2022

A related problem: abbrevations are matched in source text before @-escapes are resolved.

This means that Abbreviate "a@@61b"; will not match in the string "a=b a@{3D}b", even though "=", "@@61", and "@{3D}" are all the same character.

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

No branches or pull requests

2 participants