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

[FEATURE REQUEST] JS-agnostic intermediate representation #1075

Open
Lupus opened this issue Dec 13, 2020 · 1 comment
Open

[FEATURE REQUEST] JS-agnostic intermediate representation #1075

Lupus opened this issue Dec 13, 2020 · 1 comment

Comments

@Lupus
Copy link

Lupus commented Dec 13, 2020

js_of_ocaml is a really cool compiler! I'm fascinated with that it can do. Yet it targets only one language - JavaScript, while it's certainly feasible to target more languages with bytecode approach, rehp has Php backend working along with JS, and there is Go backend in a separate project.

The bytecode parsing machinery up to generate.ml is in general agnostic to target language. What Rehp does is adding intermediate representation layer for program tree, that is also agnostic to target language. Having that alone in js_of_ocaml can enable one to use it as a library to produce the IR, and take it from there to target whatever language desired.

Bytecode based approach is considered the best, and js_of_ocaml can become a solid foundation for various compilers going this route.

/cc @jordwalke

@hhugo
Copy link
Member

hhugo commented Dec 13, 2020

Contributions are welcome

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

2 participants