-
Notifications
You must be signed in to change notification settings - Fork 206
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
write bang-syntax convertor #150
Comments
It looks like we will need to use Babel, and will actually have to fork the Babel parser (formerly Babylon) to be able to do this: https://babeljs.io/docs/en/next/babel-parser.html#will-the-babel-parser-support-a-plugin-system |
I think rollup uses |
It looks like we could write an acorn parser plugin like this one for bigint. It seems to be a lot cleaner than plugins for the Babel parser (which is explicitly not supported by them.) The only downside I can see is that an acorn plugin is probably only narrowly useful for Rollup and maybe a few other things, but almost everyone uses Babel. Rollup supports Babel, for instance. Still, it might be helpful to get it working with Acorn and then do Babel at some point in the future. |
How similar are their ASTs? |
I'm still early in the investigation, but they appear to be very similar. Babel-parser says it's based heavily on Acorn. https://babeljs.io/docs/en/next/babel-parser.html |
Good. In that case, if one is substantially easier to get working first, do that one. But let's plan to eventually switch to Babel. |
This has been deprioritized, but to record some of my notes: Once this is done, we will need to add an argument to |
Why not the kernel?
|
Brian might be able to speak to that. I'm not sure myself, but those were the instructions that I got from him. @warner |
We don't have an |
Good |
I may have a go at this for Tessie... I'm already using Babel to do the rewrites from Tessie to Jessie. (And I would like to use Tessie to write vat code for SwingSet.) |
in the old repo. this was SwingSet issue 6 |
We'd like to be able to use "bang syntax" in userspace Vat code:
x ! foo(y)
. This should be converted intoE(x).foo(y)
. This probably wants to be a plugin to our use ofrollup
when bundling the vat code into a single string.If we can accomplish that, we should jump ahead to converting it into
E('send', x, 'foo', y)
, and change the E object to match. By providing the method name as a string, we can avoid the need for a Proxy (to glean the method name when it gets looked up), which would be faster and simpler.The original Promises proposal (http://web.archive.org/web/20161026162206/http://wiki.ecmascript.org/doku.php?id=strawman:concurrency) describes the syntax, although we might need to update some parts of it.
The text was updated successfully, but these errors were encountered: