Takeshi Yoneda
4aa3c39da2
Removes unnecessary mutex on Table/Memory Instance ( #1755 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-10-05 08:57:09 +09:00
Takeshi Yoneda
756ecc58e2
Simplifies wasm.ElementInstance struct ( #1754 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-10-05 08:11:21 +09:00
Takeshi Yoneda
a6ef3c7524
Changes ModuleID for listener existence per function ( #1742 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-10-02 10:12:59 +09:00
Takeshi Yoneda
c10914ed03
wazevo: passes start spectest ( #1666 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-08-28 13:30:54 +09:00
Takeshi Yoneda
4709f04be3
Adds LookupFunction in experimental/table package ( #1637 )
2023-08-20 08:10:10 +09:00
Takeshi Yoneda
b8262fe4fb
Lifts LookupFunction into ModuleInstance from ModuleEngine ( #1636 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-08-18 10:46:50 +09:00
Takeshi Yoneda
112c0d445d
wazevo: adds support for local.tee, selects ( #1634 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-08-17 11:30:27 +09:00
Takeshi Yoneda
a9c5a44690
wazevo: adds support for imported memory ( #1628 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-08-14 15:47:18 +09:00
Takeshi Yoneda
7c88d2a9d4
wazevo: adds support for load instructions ( #1624 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-08-11 11:22:24 +09:00
Nuno Cruces
1bd9a3c17b
Use atomic.Uint64. ( #1620 )
...
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com >
2023-08-09 14:09:54 +01:00
Crypt Keeper
2f2b6a9d2c
sysfs: Makes ReadFS and AdaptFS embeddable ( #1607 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-08-02 08:27:50 +08:00
Crypt Keeper
1f8c908f1c
Exposes writeable filesystem as experimentalsys.FS ( #1605 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-07-31 07:56:28 +08:00
Crypt Keeper
b842d6cbfd
fsapi: adds Oflag to decouple from syscall package ( #1586 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-07-19 16:01:44 +08:00
Crypt Keeper
2f8dd23097
adds experimental sys.Errno to begin decoupling from the syscall package ( #1582 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-07-17 08:13:29 +08:00
Crypt Keeper
0300f4b3c1
experimental: adds close notification hook ( #1574 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-07-11 09:27:43 +08:00
Crypt Keeper
326c267726
Exposes Module.IsClosed to prevent calling functions when closed ( #1573 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
Co-authored-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-07-10 15:32:51 +08:00
Crypt Keeper
2c21f3aa8f
wasi: adds Go readdir integration tests for GOOS=wasip1 and TinyGo ( #1562 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-07-06 16:19:24 +08:00
Takeshi Yoneda
4aca6fbd0e
Updates Spectest to the latest (May 23, 2023) ( #1490 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-05-23 15:09:36 +10:00
Takeshi Yoneda
50723a0fd2
Refactors spectest harness ( #1489 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-05-23 09:59:49 +10:00
Anuraag Agrawal
714368bcea
Remove threads support ( #1487 )
...
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com >
2023-05-22 12:18:36 +10:00
Crypt Keeper
34324031cb
extracts FS interfaces into fsapi package and consolidates impls ( #1477 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com >
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com >
2023-05-17 07:19:54 +03:00
Anuraag Agrawal
90eba1b81c
Require max size for shared memory ( #1473 )
...
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com >
2023-05-16 16:14:13 +08:00
Anuraag Agrawal
bc96257575
Implement WebAssembly threads proposal with interpreter ( #1460 )
...
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com >
2023-05-16 12:22:17 +08:00
Nuno Cruces
4ceef7b245
memory: avoid integer overflow ( #1459 )
...
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com >
2023-05-12 14:53:00 +08:00
Takeshi Yoneda
80452a94c3
Bulk lazy initialization of FunctionDefinitions ( #1425 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com >
2023-05-12 08:02:40 +10:00
Adrian Cole
cf5ebf6f6b
Use require.ErrnoEquals for more precise failures
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-05-03 13:54:12 +08:00
Crypt Keeper
493fe2d410
sysfs: stubs in approach to defining a new file type ( #1290 )
...
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-05-01 12:33:40 +08:00
Takeshi Yoneda
f47b0d3362
Reduces FunctionDefinition usages ( #1419 )
...
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com >
2023-05-01 10:37:43 +08:00
Nuno Cruces
77e8d72d67
api: adds CallWithStack to avoid allocations ( #1407 )
...
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com >
2023-05-01 08:52:40 +09:00
Thomas Pelletier
0bfb4b52eb
Give Listener a read-only view of globals ( #1404 )
...
* experimental: give listener r/o view of globals
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* experimental: add global support to interpreter
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* exp: replace globals proxy with module interface
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* exp: trim down experimental.InternalModule
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* Replace globals view slice with constantGlobal
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* Fix tests after merge
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* Address PR feedback
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* Rename methods of experimental.Module
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* Run make check
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
* Add WazeroOnlyType to constantGlobal
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
---------
Signed-off-by: Thomas Pelletier <thomas@pelletier.codes >
2023-04-29 00:07:28 -07:00
Crypt Keeper
6098f60bd1
Adds SplitCallStack for use in CallWithStack ( #1414 )
...
This adds an internal function `wasm.SplitCallStack` for use in #1407 .
This is separate because the diff is a lot larger than the destination
change ;)
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-04-29 13:28:52 +08:00
Nuno Cruces
197facf7a9
Close certain api interfaces for external implementation ( #1396 )
...
This adds a new type `internalapi.WazeroOnly` which should be embedded on types users are likely to accidentally implement despite docs saying otherwise.
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com >
2023-04-28 15:32:32 +08:00
Crypt Keeper
40341af448
fs: returns EBADF on negative file descriptor ( #1391 )
...
This changes file descriptors from uint32 to int32 and the
corresponding file table to reject negative values. This ensures
invalid values aren't mistaken for very large descriptor entries, which
can use a lot of memory as the table implementation isn't designed to
be sparse.
See https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html#tag_16_90
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-04-21 16:08:35 +02:00
Takeshi Yoneda
d33ecd0e3a
cache: fixes consistency with CloseOnContextDone and listeners ( #1381 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-19 15:00:46 +09:00
Crypt Keeper
df0faa5d16
emscripten: adds experimental InstantiateForModule for invoke exports ( #1372 )
...
This adds emscripten.InstantiateForModule into the experimental package.
This builds dynamic invoke exports in the same order and only matching
those needed by the importing modules.
Finally, this removes special casing of function type IDs by deferring
resolution of them only in Emscripten.
Fixes #1364
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-04-18 09:13:50 +02:00
Crypt Keeper
b9e03dc691
Makes host function index insertion order ( #1370 )
...
This makes host functions index consistently on insertion order, rather
than lexicographic order. This helps with ABI such as Emscripten, which
need an expected order.
This also constrains the internal code around host functions to only one
export name. More than one was never used. By restricting this, logic is
simpler and smaller.
Signed-off-by: Adrian Cole <adrian@tetrate.io >
2023-04-17 17:18:11 +01:00
Clifton Kaznocha
00d9d885ff
Cleanup aliased modules when the main module is deleted ( #1365 )
...
Signed-off-by: Clifton Kaznocha <ckaznocha@users.noreply.github.com >
2023-04-17 09:32:08 +09:00
Clifton Kaznocha
a9ec3b62d3
Shrink the store's nameToModule map ( #1285 )
...
Signed-off-by: Clifton Kaznocha <ckaznocha@users.noreply.github.com >
2023-04-17 08:40:58 +09:00
Takeshi Yoneda
8ac9a54923
wasm: reduces allocs during import resolution ( #1361 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-13 12:35:04 +09:00
Takeshi Yoneda
a979e0f643
wasm: removes name node to simplify instantiation path ( #1359 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-13 09:26:18 +09:00
Takeshi Yoneda
a56b4435c1
Fixes memory capacity with max larger than limit ( #1356 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-12 09:23:48 +09:00
Takeshi Yoneda
c719af9a14
binary: avoids copy in decodeUTF8 ( #1354 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-11 14:26:28 +09:00
Takeshi Yoneda
84ea9efc14
binary: reduces allocation during code section decoding ( #1352 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-10 21:48:09 +09:00
Takeshi Yoneda
3cbd881201
binary: makes NameMap and IndirectNameMap slices over values, not ptrs ( #1351 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-10 21:27:50 +09:00
Takeshi Yoneda
87942692bf
Reuses stack in requireStackValues of func validation ( #1341 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-04 10:49:07 +09:00
Takeshi Yoneda
4f6b9f6637
Reuses bytes.Reader and value stack in func validation ( #1340 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-04 10:31:15 +09:00
Takeshi Yoneda
18195355d5
Fixes race in TestModuleInstance_CloseModuleOnCanceledOrTimeout ( #1339 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-03 16:48:19 +09:00
Takeshi Yoneda
4dbdbc79a2
Defer resource closure on context cancelation to ModuleInstance.FailIfClosed ( #1336 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-03 12:42:27 +09:00
Takeshi Yoneda
fa3090a022
Allows WithMemoryLimitPages to override the default pages ( #1335 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-04-03 09:30:34 +09:00
Takeshi Yoneda
ebe48da023
Reuses allocated slices in func validation ( #1328 )
...
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io >
2023-03-31 15:58:15 +09:00