proposal-binary-ast
proposal-binary-ast copied to clipboard
Binary AST proposal for ECMAScript
As discussed on Gitter, we might want to do this to simplify handling and provide optimised representations (like https://github.com/binast/binjs-ref/issues/239) more easily for both kinds of numbers. Some points from the...
- There is a new [Linkable] attribute extension, which tells the surface encoding that the [Linkable] attribute must be random accessible. - The NodeLink type that opaquely references a [Linkable]...
I'm not convinced it's required to marry the binary format too tightly to the JS source, and there are things you could do to make it simpler. It's not like...
from https://bugzilla.mozilla.org/show_bug.cgi?id=1472103#c20 `attribute unsigned long length;` would need a comment that it's function object's length property.
Binary AST could hold additional type information for variables, parameters and return types. This can help VMs do some optimizations ahead of time. Of course types should be statically validated...
How would a binary AST encoded resource be delivered when SRI is involved? How should the hash be calculated on both the encoder and the decoder sides?
It's possible for valid Javascript strings to be invalid unicode strings - arising out of the fact that JS strings are specced as arbitrary sequences of 16-bit words. This means...
They're listed as strings in the spec, but it would seem highly inefficient to encode them that way. Are they in fact encoded as strings? (If not, you *could* encode...
It is almost certainly too early to worry about this, but a couple notes while I'm thinking of them: - The tree grammar specified does not allow `for (var a...