-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Add bultins: i32/i64/f32/f64.add/sub/mul #1484
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Thanks!
Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into these! 👍 LGTM with the comment below resolved.
Do you plan to add sub
, mul
, div
etc. as well?
@dcodeIO Thank you. |
I'd be fine with including similar ones in this PR, like the mentioned |
I've added i = sub<i32>(2, 1); assert(i == 1); I'm getting this:
Any idea where to dig? |
try to swap let ret = module.binary(
op,
module.local_get(temp1.index, nativeType), // try temp2.index instead
module.local_get(temp2.index, nativeType) // try temp1.index instead
); I guess problem with wrong argument's order somewhere |
Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
Co-authored-by: Max Graey <maxgraey@gmail.com>
🎉 This PR is included in version 0.14.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
add
sub
mul
Added i32/i64/f32/f64.add bultins
Added related types
Added tests for it to
tests/compiler/builtins.ts
and rebuilt related fixturesFixed one typo in
tests/compiler/builtins.ts
Related issue: #1310