diff options
author | cjihrig <cjihrig@gmail.com> | 2019-12-15 18:38:58 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-18 04:35:09 +0300 |
commit | b6c589fde50b5b69a77fa6f316bccbc9ff259f48 (patch) | |
tree | 646fcd7310508606cc917d17f2c2dbcb9f59488e /src | |
parent | 145116b3a16905291f3f1c96646aa89730271002 (diff) |
deps,src,test: update to uvwasi 0.0.3
This commit updates to uvwasi 0.0.3, which implements a newer
version of the WASI spec, snapshot_1. Since the WASI API has
changed, this also requires updating the WebAssembly memory
interfacing logic and recompiling the WASI tests with a
version of wasi-libc that supports snapshot_1.
PR-URL: https://github.com/nodejs/node/pull/30980
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_wasi.cc | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/node_wasi.cc b/src/node_wasi.cc index 39669df490c..5f4644e03ac 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -511,11 +511,11 @@ void WASI::FdFilestatGet(const FunctionCallbackInfo<Value>& args) { wasi->writeUInt64(memory, stats.st_dev, buf); wasi->writeUInt64(memory, stats.st_ino, buf + 8); wasi->writeUInt8(memory, stats.st_filetype, buf + 16); - wasi->writeUInt32(memory, stats.st_nlink, buf + 20); - wasi->writeUInt64(memory, stats.st_size, buf + 24); - wasi->writeUInt64(memory, stats.st_atim, buf + 32); - wasi->writeUInt64(memory, stats.st_mtim, buf + 40); - wasi->writeUInt64(memory, stats.st_ctim, buf + 48); + wasi->writeUInt32(memory, stats.st_nlink, buf + 24); + wasi->writeUInt64(memory, stats.st_size, buf + 32); + wasi->writeUInt64(memory, stats.st_atim, buf + 40); + wasi->writeUInt64(memory, stats.st_mtim, buf + 48); + wasi->writeUInt64(memory, stats.st_ctim, buf + 56); } args.GetReturnValue().Set(err); @@ -1039,11 +1039,11 @@ void WASI::PathFilestatGet(const FunctionCallbackInfo<Value>& args) { wasi->writeUInt64(memory, stats.st_dev, buf_ptr); wasi->writeUInt64(memory, stats.st_ino, buf_ptr + 8); wasi->writeUInt8(memory, stats.st_filetype, buf_ptr + 16); - wasi->writeUInt32(memory, stats.st_nlink, buf_ptr + 20); - wasi->writeUInt64(memory, stats.st_size, buf_ptr + 24); - wasi->writeUInt64(memory, stats.st_atim, buf_ptr + 32); - wasi->writeUInt64(memory, stats.st_mtim, buf_ptr + 40); - wasi->writeUInt64(memory, stats.st_ctim, buf_ptr + 48); + wasi->writeUInt32(memory, stats.st_nlink, buf_ptr + 24); + wasi->writeUInt64(memory, stats.st_size, buf_ptr + 32); + wasi->writeUInt64(memory, stats.st_atim, buf_ptr + 40); + wasi->writeUInt64(memory, stats.st_mtim, buf_ptr + 48); + wasi->writeUInt64(memory, stats.st_ctim, buf_ptr + 56); } args.GetReturnValue().Set(err); @@ -1406,11 +1406,10 @@ void WASI::PollOneoff(const FunctionCallbackInfo<Value>& args) { wasi->readUInt8(memory, &sub.type, in_ptr + 8); if (sub.type == UVWASI_EVENTTYPE_CLOCK) { - wasi->readUInt64(memory, &sub.u.clock.identifier, in_ptr + 16); - wasi->readUInt32(memory, &sub.u.clock.clock_id, in_ptr + 24); - wasi->readUInt64(memory, &sub.u.clock.timeout, in_ptr + 32); - wasi->readUInt64(memory, &sub.u.clock.precision, in_ptr + 40); - wasi->readUInt16(memory, &sub.u.clock.flags, in_ptr + 48); + wasi->readUInt32(memory, &sub.u.clock.clock_id, in_ptr + 16); + wasi->readUInt64(memory, &sub.u.clock.timeout, in_ptr + 24); + wasi->readUInt64(memory, &sub.u.clock.precision, in_ptr + 32); + wasi->readUInt16(memory, &sub.u.clock.flags, in_ptr + 40); } else if (sub.type == UVWASI_EVENTTYPE_FD_READ || sub.type == UVWASI_EVENTTYPE_FD_WRITE) { wasi->readUInt32(memory, &sub.u.fd_readwrite.fd, in_ptr + 16); |