Skip to content

Commit 2c84c7b

Browse files
author
katelyn martin
authored
Revert PR's 415 and 421 (#435)
* Revert "Enable more than one `handle` type in `*.witx` (#421)" This reverts commit 834679b. * Revert "Implement a new `use` syntax (#415)" This reverts commit fc3da39.
1 parent dbc1b13 commit 2c84c7b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3601
-2517
lines changed

phases/ephemeral/docs.md

Lines changed: 553 additions & 527 deletions
Large diffs are not rendered by default.

phases/ephemeral/witx/typenames.witx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,8 @@
281281
)
282282
)
283283

284-
(resource $fd)
285284
;;; A file descriptor handle.
286-
(typename $fd (handle $fd))
285+
(typename $fd (handle))
287286

288287
;;; A region of memory for scatter/gather reads.
289288
(typename $iovec

phases/ephemeral/witx/wasi_ephemeral_args.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
44
;; for an explanation of what that means.
55

6-
(use $errno $size from $typenames)
6+
(use "typenames.witx")
77

88
(module $wasi_ephemeral_args
9+
;;; Linear memory to be accessed by WASI functions that need it.
10+
(import "memory" (memory))
11+
912
;;; Read command-line argument data.
1013
;;; The size of the array should match that returned by `sizes_get`.
1114
;;; Each argument is expected to be `\0` terminated.

phases/ephemeral/witx/wasi_ephemeral_clock.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use $clockid $timestamp $errno from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_clock
11+
;;; Linear memory to be accessed by WASI functions that need it.
12+
(import "memory" (memory))
13+
1114
;;; Return the resolution of a clock.
1215
;;; Implementations are required to provide a non-zero value for supported clocks. For unsupported clocks,
1316
;;; return `errno::inval`.

phases/ephemeral/witx/wasi_ephemeral_environ.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
44
;; for an explanation of what that means.
55

6-
(use $errno $size from $typenames)
6+
(use "typenames.witx")
77

88
(module $wasi_ephemeral_environ
9+
;;; Linear memory to be accessed by WASI functions that need it.
10+
(import "memory" (memory))
11+
912
;;; Read environment variable data.
1013
;;; The sizes of the buffers should match that returned by `sizes_get`.
1114
;;; Key/value pairs are expected to be joined with `=`s, and terminated with `\0`s.

phases/ephemeral/witx/wasi_ephemeral_fd.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use * from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_fd
11+
;;; Linear memory to be accessed by WASI functions that need it.
12+
(import "memory" (memory))
13+
1114
;;; Provide file advisory information on a file descriptor.
1215
;;; Note: This is similar to `posix_fadvise` in POSIX.
1316
(@interface func (export "advise")

phases/ephemeral/witx/wasi_ephemeral_path.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use * from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_path
11+
;;; Linear memory to be accessed by WASI functions that need it.
12+
(import "memory" (memory))
13+
1114
;;; Create a directory.
1215
;;; Note: This is similar to `mkdirat` in POSIX.
1316
(@interface func (export "create_directory")

phases/ephemeral/witx/wasi_ephemeral_poll.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use $event $subscription $size $errno from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_poll
11+
;;; Linear memory to be accessed by WASI functions that need it.
12+
(import "memory" (memory))
13+
1114
;;; Concurrently poll for the occurrence of a set of events.
1215
;;;
1316
;;; If `nsubscriptions` is 0, returns `errno::inval`.

phases/ephemeral/witx/wasi_ephemeral_proc.witx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use $exitcode from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_proc
1111
;;; Terminate the process normally. An exit code of `$exitcode::success`

phases/ephemeral/witx/wasi_ephemeral_random.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use $errno $size from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_random
11+
;;; Linear memory to be accessed by WASI functions that need it.
12+
(import "memory" (memory))
13+
1114
;;; Write high-quality random data into a buffer.
1215
;;; This function blocks when the implementation is unable to immediately
1316
;;; provide sufficient high-quality random data.

phases/ephemeral/witx/wasi_ephemeral_sched.witx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use $errno from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_sched
1111
;;; Temporarily yield execution of the calling thread.

phases/ephemeral/witx/wasi_ephemeral_sock.witx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
66
;; for an explanation of what that means.
77

8-
(use * from $typenames)
8+
(use "typenames.witx")
99

1010
(module $wasi_ephemeral_sock
11+
;;; Linear memory to be accessed by WASI functions that need it.
12+
(import "memory" (memory))
13+
1114
;;; Receive a message from a socket.
1215
;;; Note: This is similar to `recv` in POSIX, though it also supports reading
1316
;;; the data into multiple buffers in the manner of `readv`.

0 commit comments

Comments
 (0)