-
Notifications
You must be signed in to change notification settings - Fork 570
Add syscall/js #908
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 syscall/js #908
Conversation
Meh, this sounds like a flaky issue |
@hajimehoshi While working on WebAssembly I've noticed that |
@neelance Thank. I think I'll do this in another PR later. |
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.
The changes in this PR look good to me.
See inline comments. Hopefully the flaky test can be worked around so the tests pass before this is merged.
@neelance Hi, are you happy with this PR? Thanks! |
ping @neelance |
Is this passing the normal tests of the Is there any particular need for the custom test cases of this PR? |
To test |
BTW, I put a test file at |
Shouldn't it be possible to modify |
Almost done! I found a problem in
This cannot be compiled on 32bit-integer environment and GopherJS is an environment with 32bit integers. Replacing the test function in a usual GopherJS way didn't work. Probably the const check happens before the replacing. Any suggestions? EDIT: Looks like CircleCI tests passed. No worries! On my local machine, EDIT2: My bad, I didn't add
|
This is unfortunate. Okay, maybe coping |
OK, I copied the test, but now I'm facing a new error on my machine:
Looks like the file is compiled Now it's midnight, I'll investigate this further later... |
@neelance In the current implementation, is it possible to 'add' new tests in compiler/native? |
I thought it impossible, so I moved
Please take a look |
The zero value is quite important. I think it should be possible to handle this correctly, shouldn't it? |
Yes. I fixed that so that the zero value is js.Undefined. I appreciate your patience and your support. Please take another look. |
ping |
This is fantastic 🎉. Well done @hajimehoshi |
This PR adds a new package
syscall/js
. Originallysyscall/js
is for WebAssembly, but in GopherJS this package works as a wrapper ofgithub.com/gopherjs/gopherjs/js
. With this package, developers can usesyscall/js
both for GopherJS and WebAssembly.The implementation is basically same as
github.com/gohperjs/gopherwasm
.Fixes #899