-
Notifications
You must be signed in to change notification settings - Fork 194
Compiler: keep Int32 and Nativeint in the IR for the js backend #1915
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
Conversation
Experimentation based on this comment #1649 (comment) |
With the current PR, compiling ocamlc result in the following diff. Two $ diff master.js pr.js
35587c35587
< Math.floor(v14535 * 4 / v14534 * 1000. + 0.5) / 1000.),
---
> Math.floor(v14535 * 4. / v14534 * 1000. + 0.5) / 1000.),
35595c35595
< var v14543 = [0, v14542.length - 2 | 0], v14545 = v14544 * 4;
---
> var v14543 = [0, v14542.length - 2 | 0], v14545 = v14544 * 4.; |
f4b9dab
to
b4dc100
Compare
The issue now is that wasmoo uses information from the js runtime but some |
I did not plan to do that. One issue is that if we start duplicating this information, we will have to make sure to keep things in sync. The other issue is that I don't know where else to put this information. |
49f4cac
to
e780e71
Compare
This PR is now includes
With this PR, wasmoo no longer resolves aliases during codegen. Aliases are still used to compute purity though. I think there is still an issue with #1922, can you take a look ? |
This is a better name for the primitive that sets up a trampoline to switch to CPS.
Previously, primitives taking float arguments
could receive Int/Int32/NativeInt/Float arg