-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Memory64] wasi JS changes for 64-bit #15224
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
src/library_wasi.js
Outdated
@@ -181,7 +183,7 @@ var WasiLibrary = { | |||
#if SYSCALLS_REQUIRE_FILESYSTEM == 0 && (!MINIMAL_RUNTIME || EXIT_RUNTIME) | |||
$flush_NO_FILESYSTEM: function() { | |||
// flush anything remaining in the buffers during shutdown | |||
if (typeof _fflush !== 'undefined') _fflush(0); | |||
if (typeof _fflush !== 'undefined') _fflush({{{ sizeT(0) }}}); |
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.
Do you have pointerT
already? (fflush takes a pointer) (if not its probably not worth adding it for this one place).
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.
renamed it, since this seemed the only use of the function.
var ptr = {{{ makeGetValue('iov', 'i*8', 'i32') }}}; | ||
var len = {{{ makeGetValue('iov', 'i*8 + 4', 'i32') }}}; | ||
var ptr = {{{ makeGetValue('iov', `i*${Runtime.POINTER_SIZE}*2`, `${POINTER_TYPE}`) }}}; | ||
var len = {{{ makeGetValue('iov', `i*${Runtime.POINTER_SIZE}*2 + ${Runtime.POINTER_SIZE}`, `${POINTER_TYPE}`) }}}; |
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.
We should probably be using C_STRUCTS
stuff here.. I can look into that as a followup.
No description provided.