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

长期计划:编译器 #33

Open
Artoria2e5 opened this issue Apr 20, 2021 · 5 comments
Open

长期计划:编译器 #33

Artoria2e5 opened this issue Apr 20, 2021 · 5 comments

Comments

@Artoria2e5
Copy link
Collaborator

https://monkeylang.org/ 上面还有一本做编译器的鬼书,讲的是自己煮一个 VM 然后解释字节码。我们要做着玩的话可以用 binaryen 做成 wasm,然后放进浏览器或者 wasmtime 跑着玩。

(虽然说要加速的话可能还是直接转译成 js 简单。这真的除了玩没啥意义……)

@suulnnka
Copy link

跟现在相比,只是把解释器换成了虚拟机.现在的网页版已经转成了wasm,不知道还想做什么?

(这语言跟js区别真不大,直接改成js就好了.)

@Artoria2e5
Copy link
Collaborator Author

嗯,我也觉得编译成 js 就是了。(

@Artoria2e5 Artoria2e5 changed the title 长期计划:binaryen 编译器 长期计划:编译器 Apr 20, 2021
@Char-Ten
Copy link

网页版的那个不是一个wasm的解释器吗?

@Artoria2e5
Copy link
Collaborator Author

是解释器,现在都是解释器。

@Char-Ten
Copy link

Char-Ten commented May 5, 2021

是解释器,现在都是解释器。

要不编译成wat,然后用wat2wasm转成纯wasm?wasm为了方便编译到各个指令集,其指令应该不会很复杂.....

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

No branches or pull requests

3 participants