Prematurely announcing ES-Lab (was: quasi-literal strawman)

Mark S. Miller erights at google.com
Wed Dec 23 16:51:22 PST 2009


On Wed, Dec 23, 2009 at 10:45 AM, Kevin Curtis <kevinc1846 at googlemail.com>wrote:

> The JsonML AST was a half-baked go at 'scheme by the backdoor'.
> (Though I muddied the water with the idea of using JsonML as a
> transport protocol. Doh.).
>
> The strawman has been updated with an 'ast' entry:
> http://wiki.ecmascript.org/doku.php?id=strawman:ast
>
>
Funny you should mention that. At ES-Lab
<http://code.google.com/p/es-lab/>, Tom
Van Cutsem and I have been defining a JsonML-based representation of ES5
ASTs. Now seems as good a time as any to announce it. See <
http://code.google.com/p/es-lab/wiki/JsonMLASTFormat>. A playground for
seeing what ASTs are produced from parsing ES5 source texts is at <
http://es-lab.googlecode.com/svn/trunk/site/esparser/index.html>. A
half-written ES5 meta-interpreter driven by these ASTs is at <
http://code.google.com/p/es-lab/source/browse/trunk/src/eval/eval.js>.

For us, the immediate big payoff for these ASTs is the ability to write the
simple verifier needed by the partial SES implementation at <
http://code.google.com/p/es-lab/source/browse/trunk/src/#src/ses>. Please
keep in mind that all this is still a work in progress. However, the SES
work has already gotten far enough along that I'm convinced that, given a
parser->AST and an identity-hashtable, all the rest of the SES proposed by
those files can be implemented in a SES-compatible ES5[*] with
1) a small download
2) no blacklisting
3) no runtime whitelisting
4) no runtime overhead, aside from a eval, Function, RegExp.prototype.test,
RegExp.prototype.exec and a quick initialization.

* In an ES5 meeting the conditions stated at the top of initSES.js. Since we
have not yet gotten our hands on any complete ES5 implementations, we don't
yet know how realistic this is.


-- 
   Cheers,
   --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20091223/91f6442b/attachment.html>


More information about the es-discuss mailing list