You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we use a bunch of string literals in the parser. We should be able to replace those with for example numbers.
I'm thinking of something like this:
Inject an object that maps all AST nodes to a number and make sure the closure compiler inlines those numbers. In the compiler, use the same object to traverse the AST in a logical way.
For the parseExpression function, we will still need the expanded human readable names, but that will reduce the repetition of those names in both the parser and the AST to only one central place.
Before integrating, make sure that the total binary size actually decreases! Especially compression already cause the duplicated strings to impact the binary size not that much.
The text was updated successfully, but these errors were encountered:
Right now, we use a bunch of string literals in the parser. We should be able to replace those with for example numbers.
I'm thinking of something like this:
Inject an object that maps all AST nodes to a number and make sure the closure compiler inlines those numbers. In the compiler, use the same object to traverse the AST in a logical way.
For the
parseExpression
function, we will still need the expanded human readable names, but that will reduce the repetition of those names in both the parser and the AST to only one central place.Before integrating, make sure that the total binary size actually decreases! Especially compression already cause the duplicated strings to impact the binary size not that much.
The text was updated successfully, but these errors were encountered: