Skip to content
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

Binary AST (Stage 1) #21

Open
hzoo opened this issue Jul 28, 2017 · 9 comments
Open

Binary AST (Stage 1) #21

hzoo opened this issue Jul 28, 2017 · 9 comments

Comments

@hzoo
Copy link
Member

hzoo commented Jul 28, 2017

Champions: @syg, @vdjeric, @Yoric, @kannan-vijayan
Spec Repo: https://github.com/syg/ecmascript-binary-ast/
First presented at the July 2017 meeting: https://github.com/tc39/agendas/blob/master/2017/07.md

Why is this relevant

Babel operates on an AST, and would be part of the toolchain that should be able to take advantage of this format. This would help consolidate tooling to use the same AST. Would be a breaking change, unless our AST is adopted (unlikely, and probably not desired).

@hzoo hzoo mentioned this issue Jul 28, 2017
10 tasks
@littledan
Copy link

At this point, there's no particular implementation action to be taken. The binary format has not yet been fully designed.

@Jamesernator
Copy link

There's now an official early spec, it'd be cool if the parts of Babel could (optionally) use this format in future instead of the ESTree based one.

I'll give a shot at creating a tool that converts Babylon's (estree-like) ASTs into the format currently in the spec to see how difficult this might be.

@syg
Copy link

syg commented May 25, 2018 via email

@Jamesernator
Copy link

I don't really intend to publish anything per se other than maybe sharing a link to an interactive version until the spec is more stable. But I think trying to implement a Babel -> BinaryAST converter will give some good insights.

I've already found a couple of odd bits and pieces in the AST that I (personally) find odd so I'll open some issues on the binary AST repo itself.

@bakkot
Copy link

bakkot commented May 25, 2018

@Jamesernator, you might want to take a look at https://github.com/shapesecurity/shift-spidermonkey-converter-js, which does conversions between a format similar to the one in binast (i.e. shift) and a format similar to the one in babel (i.e. estree). It's a little out of date, but not too far off.

@syg
Copy link

syg commented May 25, 2018 via email

@bakkot
Copy link

bakkot commented Jul 14, 2018

@Jamesernator, did you ever end up filing those issues? If you (remember them) and still think they're valid, I'd be interest in reading them.

@mgttt
Copy link

mgttt commented Sep 25, 2019

Dear all, is there any "compressed" AST algorithm available? My scenario is to ship sort-of compile code snapshot to live server, which trigger by github-hook (i.e. after source code pushed to github, using a hook to forward the code and compile and then ship to live server)....

@Yoric
Copy link

Yoric commented Sep 25, 2019

@wanjochan The latest versions of the Binary AST format use a compressed format, yes. It's still very experimental, though, and the details of the format will change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants