diff options
author | cjihrig <cjihrig@gmail.com> | 2019-12-15 18:38:58 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2020-01-03 18:12:03 +0300 |
commit | 32805a9525d533ea7e58bd2536be4b40f5ed3fe9 (patch) | |
tree | c200c89514cf6a16f69cc3cf62ba88c8fdd79b44 /src/node_wasi.cc | |
parent | f8aa3655082bd95ce05cb9eb21251b74ff8d0306 (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/node_wasi.cc')
-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); |