-
Notifications
You must be signed in to change notification settings - Fork 125
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
长期计划:编译器 #33
Comments
跟现在相比,只是把解释器换成了虚拟机.现在的网页版已经转成了wasm,不知道还想做什么? (这语言跟js区别真不大,直接改成js就好了.) |
嗯,我也觉得编译成 js 就是了。( |
网页版的那个不是一个wasm的解释器吗? |
是解释器,现在都是解释器。 |
要不编译成wat,然后用wat2wasm转成纯wasm?wasm为了方便编译到各个指令集,其指令应该不会很复杂..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://monkeylang.org/ 上面还有一本做编译器的鬼书,讲的是自己煮一个 VM 然后解释字节码。我们要做着玩的话可以用 binaryen 做成 wasm,然后放进浏览器或者 wasmtime 跑着玩。
(虽然说要加速的话可能还是直接转译成 js 简单。这真的除了玩没啥意义……)
The text was updated successfully, but these errors were encountered: