Fix large variable count numbering - #2244
Conversation
a16850e to
662ee81
Compare
lukastaegert
left a comment
There was a problem hiding this comment.
Thanks for the quick fix + test! Just a minor suggestion.
| const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$'; | ||
|
|
||
| export function toBase64(num: number) { | ||
| export function toBase64(num: number, base63 = false) { |
There was a problem hiding this comment.
Is there any reason why we should not always use base63? As far as I can see, this is only used for deshadowing anyway so there should not be any issues. But using a function toBase64 to convert to base 63 but only in some situations seems a little weird.
|
Variable deshadowing in combined scopes will still use base64 for what it is worth. We could certainly make both base63, just that 64 is a nice number really to keep. |
I see. But I checked and we also use it for export minification where the algorithm relies on it being base 64 so ok. Maybe we should separate these concerns at some point. |
Because of the special treatment of
$$in variable deshadowing, we need to avoid outputting this as a trailer in safe import binding deshadowing. This limits the base output to 63 to avoid the use of$possibly creating a$$output.Fixes #2241.