Commit Graph

1830 Commits

Author SHA1 Message Date
Takeshi Yoneda
f47fd2e46e ssa: memory usage optimization around lastDefinitions (#2233)
This avoids the unnecessary duplicated zero initial value definitions 
for Wasm function locals. As a result, for certain binaries which
have huge number of locals like Zig standard libraries,  we can see
1~10% improvements in compilation performance without impacting 
other cases like the below.

### Zig Stdlib tests
```
                             │ old_zig.txt │            new_zig.txt            │
                             │   sec/op    │   sec/op    vs base               │
Zig/Compile/test-opt.wasm-10    4.466 ± 2%   4.399 ± 0%   -1.50% (p=0.007 n=7)
Zig/Run/test-opt.wasm-10        18.86 ± 0%   18.84 ± 0%        ~ (p=0.535 n=7)
Zig/Compile/test.wasm-10        5.684 ± 1%   5.084 ± 1%  -10.55% (p=0.001 n=7)
Zig/Run/test.wasm-10            19.28 ± 1%   19.25 ± 1%        ~ (p=0.535 n=7)
geomean                         9.802        9.490        -3.18%

                             │ old_zig.txt  │            new_zig.txt             │
                             │     B/op     │     B/op      vs base              │
Zig/Compile/test-opt.wasm-10   395.4Mi ± 0%   396.7Mi ± 0%  +0.32% (p=0.001 n=7)
Zig/Run/test-opt.wasm-10       741.7Mi ± 0%   741.7Mi ± 0%       ~ (p=0.941 n=7)
Zig/Compile/test.wasm-10       671.6Mi ± 0%   660.1Mi ± 0%  -1.72% (p=0.001 n=7)
Zig/Run/test.wasm-10           1.296Gi ± 0%   1.296Gi ± 0%       ~ (p=0.363 n=7)
geomean                        715.1Mi        712.6Mi       -0.35%

                             │ old_zig.txt │            new_zig.txt            │
                             │  allocs/op  │  allocs/op   vs base              │
Zig/Compile/test-opt.wasm-10   363.1k ± 0%   363.2k ± 0%       ~ (p=0.456 n=7)
Zig/Run/test-opt.wasm-10       51.58k ± 0%   51.58k ± 0%       ~ (p=0.812 n=7)
Zig/Compile/test.wasm-10       516.3k ± 0%   515.5k ± 0%  -0.16% (p=0.001 n=7)
Zig/Run/test.wasm-10           2.156M ± 0%   2.156M ± 0%       ~ (p=0.171 n=7)
geomean                        380.0k        379.8k       -0.03%
```

### wazero compiled as wasip1 binary 
```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │           new.txt           │
               │   sec/op   │   sec/op    vs base         │
Compilation-10   2.418 ± 0%   2.421 ± 0%  ~ (p=0.383 n=7)

               │   old.txt    │              new.txt               │
               │     B/op     │     B/op      vs base              │
Compilation-10   339.9Mi ± 0%   339.9Mi ± 0%  -0.01% (p=0.001 n=7)

               │   old.txt   │           new.txt            │
               │  allocs/op  │  allocs/op   vs base         │
Compilation-10   603.9k ± 0%   604.0k ± 0%  ~ (p=0.620 n=7)
```

### TinyGo 
```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero/internal/integration_test/stdlibs
                                      │ old_tinygo.txt │            new_tinygo.txt             │
                                      │     sec/op     │    sec/op      vs base                │
TinyGo/Compile/container_heap.test-10    414.1m ± 0%     413.1m ± 1%         ~ (p=0.165 n=7)
TinyGo/Run/container_heap.test-10        14.48m ± 1%     14.54m ± 1%         ~ (p=0.383 n=7)
TinyGo/Compile/container_list.test-10    413.1m ± 1%     412.1m ± 1%         ~ (p=0.620 n=7)
TinyGo/Run/container_list.test-10        14.29m ± 0%     14.33m ± 1%         ~ (p=0.259 n=7)
TinyGo/Compile/container_ring.test-10    406.8m ± 1%     407.1m ± 1%         ~ (p=0.902 n=7)
TinyGo/Run/container_ring.test-10        14.28m ± 1%     14.29m ± 1%         ~ (p=0.318 n=7)
TinyGo/Compile/crypto_des.test-10        421.3m ± 0%     422.4m ± 1%         ~ (p=0.209 n=7)
TinyGo/Run/crypto_des.test-10            18.32m ± 1%     18.38m ± 2%         ~ (p=0.209 n=7)
TinyGo/Compile/crypto_md5.test-10        418.7m ± 1%     419.8m ± 0%         ~ (p=0.318 n=7)
TinyGo/Run/crypto_md5.test-10            21.78m ± 5%     20.65m ± 2%         ~ (p=0.165 n=7)
TinyGo/Compile/crypto_rc4.test-10        421.8m ± 4%     404.3m ± 1%    -4.16% (p=0.001 n=7)
TinyGo/Run/crypto_rc4.test-10            162.6m ± 1%     162.3m ± 1%         ~ (p=0.318 n=7)
TinyGo/Compile/crypto_sha1.test-10       420.5m ± 1%     419.4m ± 1%         ~ (p=0.535 n=7)
TinyGo/Run/crypto_sha1.test-10           16.04m ± 1%     16.12m ± 1%    +0.50% (p=0.038 n=7)
TinyGo/Compile/crypto_sha256.test-10     426.8m ± 0%     427.4m ± 1%         ~ (p=1.000 n=7)
TinyGo/Run/crypto_sha256.test-10         16.24m ±  ∞ ¹   16.38m ±  ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                  95.31m          94.88m         -0.45%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                      │ old_tinygo.txt │             new_tinygo.txt             │
                                      │      B/op      │      B/op       vs base                │
TinyGo/Compile/container_heap.test-10   48.58Mi ± 0%     48.55Mi ± 0%    -0.06% (p=0.001 n=7)
TinyGo/Run/container_heap.test-10       16.63Mi ± 0%     16.63Mi ± 0%         ~ (p=0.620 n=7)
TinyGo/Compile/container_list.test-10   48.56Mi ± 0%     48.54Mi ± 0%    -0.05% (p=0.001 n=7)
TinyGo/Run/container_list.test-10       16.40Mi ± 0%     16.40Mi ± 0%         ~ (p=0.535 n=7)
TinyGo/Compile/container_ring.test-10   47.81Mi ± 0%     47.78Mi ± 0%    -0.05% (p=0.001 n=7)
TinyGo/Run/container_ring.test-10       16.30Mi ± 0%     16.30Mi ± 0%         ~ (p=0.871 n=7)
TinyGo/Compile/crypto_des.test-10       48.70Mi ± 0%     48.67Mi ± 0%    -0.05% (p=0.001 n=7)
TinyGo/Run/crypto_des.test-10           16.76Mi ± 0%     16.76Mi ± 0%         ~ (p=0.119 n=7)
TinyGo/Compile/crypto_md5.test-10       48.75Mi ± 0%     48.73Mi ± 0%    -0.03% (p=0.001 n=7)
TinyGo/Run/crypto_md5.test-10           44.97Mi ± 0%     44.97Mi ± 0%         ~ (p=0.333 n=7)
TinyGo/Compile/crypto_rc4.test-10       47.79Mi ± 0%     47.76Mi ± 0%    -0.06% (p=0.001 n=7)
TinyGo/Run/crypto_rc4.test-10           29.28Mi ± 0%     29.28Mi ± 0%         ~ (p=0.274 n=7)
TinyGo/Compile/crypto_sha1.test-10      48.99Mi ± 0%     48.97Mi ± 0%    -0.03% (p=0.001 n=7)
TinyGo/Run/crypto_sha1.test-10          17.44Mi ± 0%     17.44Mi ± 0%         ~ (p=0.456 n=7)
TinyGo/Compile/crypto_sha256.test-10    48.82Mi ± 0%     48.81Mi ± 0%    -0.03% (p=0.004 n=7)
TinyGo/Run/crypto_sha256.test-10        17.53Mi ±  ∞ ¹   17.53Mi ±  ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                 31.45Mi          31.45Mi         -0.02%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                      │ old_tinygo.txt │            new_tinygo.txt             │
                                      │   allocs/op    │   allocs/op    vs base                │
TinyGo/Compile/container_heap.test-10    83.64k ± 0%     83.63k ± 0%         ~ (p=0.365 n=7)
TinyGo/Run/container_heap.test-10        374.9k ± 0%     374.9k ± 0%         ~ (p=1.000 n=7)
TinyGo/Compile/container_list.test-10    83.38k ± 0%     83.39k ± 0%         ~ (p=0.805 n=7)
TinyGo/Run/container_list.test-10        370.0k ± 0%     370.0k ± 0%         ~ (p=0.633 n=7)
TinyGo/Compile/container_ring.test-10    83.30k ± 0%     83.35k ± 0%         ~ (p=1.000 n=7)
TinyGo/Run/container_ring.test-10        367.6k ± 0%     367.6k ± 0%         ~ (p=0.617 n=7)
TinyGo/Compile/crypto_des.test-10        83.67k ± 0%     83.70k ± 0%         ~ (p=0.805 n=7)
TinyGo/Run/crypto_des.test-10            378.1k ± 0%     378.1k ± 0%         ~ (p=0.078 n=7)
TinyGo/Compile/crypto_md5.test-10        83.81k ± 0%     83.84k ± 0%         ~ (p=0.805 n=7)
TinyGo/Run/crypto_md5.test-10            393.3k ± 0%     393.3k ± 0%         ~ (p=0.690 n=7)
TinyGo/Compile/crypto_rc4.test-10        83.39k ± 0%     83.33k ± 0%         ~ (p=0.097 n=7)
TinyGo/Run/crypto_rc4.test-10            367.1k ± 0%     367.1k ± 0%         ~ (p=0.232 n=7)
TinyGo/Compile/crypto_sha1.test-10       84.00k ± 0%     84.06k ± 0%         ~ (p=0.154 n=7)
TinyGo/Run/crypto_sha1.test-10           392.7k ± 0%     392.7k ± 0%         ~ (p=1.000 n=7)
TinyGo/Compile/crypto_sha256.test-10     83.85k ± 0%     83.86k ± 0%         ~ (p=0.620 n=7)
TinyGo/Run/crypto_sha256.test-10         394.5k ±  ∞ ¹   394.5k ±  ∞ ¹       ~ (p=1.000 n=1) ²
```

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-07 07:57:15 -07:00
Yage Hu
0c5d97141e Fix path_symlink only works when dir mounted to / (#2229) 2024-06-05 19:51:59 -07:00
Takeshi Yoneda
506c922f0b ssa: reuses slice on basicBlock.loopNestingForestChildren (#2232)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-05 14:33:58 -07:00
Takeshi Yoneda
8dd9d5a946 ssa: removes the deadcode on BasicBlock (#2231)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-05 14:15:06 -07:00
Takeshi Yoneda
244281beb8 backend: removes the map use in ExecutableContext[Instr] (#2230)
This makes the compilation slightly more faster with less memory:
```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │             new.txt              │
               │   sec/op   │   sec/op    vs base              │
Compilation-10   2.488 ± 0%   2.438 ± 0%  -2.00% (p=0.001 n=7)

               │   old.txt    │              new.txt               │
               │     B/op     │     B/op      vs base              │
Compilation-10   341.1Mi ± 0%   340.3Mi ± 0%  -0.23% (p=0.001 n=7)

               │   old.txt   │              new.txt              │
               │  allocs/op  │  allocs/op   vs base              │
Compilation-10   607.0k ± 0%   605.5k ± 0%  -0.26% (p=0.001 n=7)
```

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-05 09:19:37 -07:00
Takeshi Yoneda
38a9374cb1 regalloc: simplifies regInUseSet (#2227)
This makes the compilation slightly faster and simplifies the codebase.

```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │             new.txt              │
               │   sec/op   │   sec/op    vs base              │
Compilation-10   2.499 ± 0%   2.478 ± 2%  -0.84% (p=0.026 n=7)

               │   old.txt    │            new.txt            │
               │     B/op     │     B/op      vs base         │
Compilation-10   341.0Mi ± 0%   341.1Mi ± 0%  ~ (p=0.128 n=7)

               │   old.txt   │           new.txt            │
               │  allocs/op  │  allocs/op   vs base         │
Compilation-10   606.9k ± 0%   606.9k ± 0%  ~ (p=0.383 n=7)
```

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-04 08:27:03 -07:00
Takeshi Yoneda
1fdaa0c737 regalloc: removes the last use of map for faster allocation (#2226)
This refactors `fixMergeState` function to remove the last use of map,
which previously caused a lot of allocations.

As a result, this improves the compilation time ~2% and makes it to use
less memory allocations. The blow is the benchmark results for the 
standard libraries as well as compiling wazero itself.

### Zig

```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero/internal/integration_test/stdlibs
                             │ old_zig.txt │           new_zig.txt            │
                             │   sec/op    │   sec/op    vs base              │
Zig/Compile/test-opt.wasm-10    4.503 ± 1%   4.497 ± 1%       ~ (p=0.902 n=7)
Zig/Run/test-opt.wasm-10        19.09 ± 1%   18.79 ± 1%  -1.56% (p=0.001 n=7)
Zig/Compile/test.wasm-10        5.739 ± 2%   5.712 ± 0%  -0.47% (p=0.002 n=7)
Zig/Run/test.wasm-10            19.36 ± 1%   19.17 ± 1%       ~ (p=0.097 n=7)
geomean                         9.886        9.808       -0.79%

                             │ old_zig.txt  │            new_zig.txt             │
                             │     B/op     │     B/op      vs base              │
Zig/Compile/test-opt.wasm-10   400.3Mi ± 0%   398.0Mi ± 0%  -0.58% (p=0.001 n=7)
Zig/Run/test-opt.wasm-10       741.7Mi ± 0%   741.7Mi ± 0%       ~ (p=0.932 n=7)
Zig/Compile/test.wasm-10       672.8Mi ± 0%   672.5Mi ± 0%  -0.04% (p=0.001 n=7)
Zig/Run/test.wasm-10           1.296Gi ± 0%   1.296Gi ± 0%       ~ (p=0.958 n=7)
geomean                        717.6Mi        716.5Mi       -0.16%

                             │ old_zig.txt │            new_zig.txt            │
                             │  allocs/op  │  allocs/op   vs base              │
Zig/Compile/test-opt.wasm-10   387.1k ± 0%   370.3k ± 0%  -4.35% (p=0.001 n=7)
Zig/Run/test-opt.wasm-10       51.58k ± 0%   51.58k ± 0%       ~ (p=0.735 n=7)
Zig/Compile/test.wasm-10       521.2k ± 0%   518.9k ± 0%  -0.43% (p=0.001 n=7)
Zig/Run/test.wasm-10           2.156M ± 0%   2.156M ± 0%       ~ (p=1.000 n=7)
geomean                        387.0k        382.3k       -1.21%
```

### wasip1

```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero/internal/integration_test/stdlibs
                                            │ old_wasip1.txt │            new_wasip1.txt             │
                                            │     sec/op     │    sec/op      vs base                │
Wasip1/Compile/src_archive_tar.test-10          2.306 ± 1%      2.257 ± 1%    -2.09% (p=0.001 n=7)
Wasip1/Run/src_archive_tar.test-10             397.8m ± 0%     398.9m ± 1%    +0.28% (p=0.002 n=7)
Wasip1/Compile/src_bufio.test-10                1.565 ± 0%      1.531 ± 3%    -2.16% (p=0.026 n=7)
Wasip1/Run/src_bufio.test-10                   120.7m ± 1%     121.2m ± 0%    +0.40% (p=0.026 n=7)
Wasip1/Compile/src_bytes.test-10                1.622 ± 0%      1.584 ± 0%    -2.32% (p=0.001 n=7)
Wasip1/Run/src_bytes.test-10                   469.2m ± 0%     467.3m ± 1%         ~ (p=0.259 n=7)
Wasip1/Compile/src_context.test-10              1.749 ± 1%      1.709 ± 0%    -2.28% (p=0.001 n=7)
Wasip1/Run/src_context.test-10                 31.54m ± 1%     31.59m ± 1%         ~ (p=0.805 n=7)
Wasip1/Compile/src_encoding_ascii85.test-10     1.409 ± 0%      1.376 ± 0%    -2.35% (p=0.001 n=7)
Wasip1/Run/src_encoding_ascii85.test-10        7.563m ± 1%     7.169m ± 2%    -5.21% (p=0.001 n=7)
Wasip1/Compile/src_encoding_asn1.test-10        1.617 ± 3%      1.585 ± 0%    -1.97% (p=0.001 n=7)
Wasip1/Run/src_encoding_asn1.test-10           8.321m ± 2%     8.196m ± 2%         ~ (p=0.053 n=7)
Wasip1/Compile/src_encoding_base32.test-10      1.459 ± 0%      1.425 ± 0%    -2.28% (p=0.001 n=7)
Wasip1/Run/src_encoding_base32.test-10         28.81m ± 3%     28.11m ± 1%    -2.40% (p=0.038 n=7)
Wasip1/Compile/src_encoding_base64.test-10      1.476 ± 0%      1.439 ± 0%    -2.46% (p=0.001 n=7)
Wasip1/Run/src_encoding_base64.test-10         11.92m ± 3%     11.86m ± 2%         ~ (p=0.209 n=7)
Wasip1/Compile/src_encoding_binary.test-10      1.508 ± 0%      1.476 ± 0%    -2.17% (p=0.001 n=7)
Wasip1/Run/src_encoding_binary.test-10         9.437m ± 3%     9.254m ± 2%    -1.94% (p=0.017 n=7)
Wasip1/Compile/src_encoding_csv.test-10         1.471 ± 0%      1.433 ± 1%    -2.60% (p=0.001 n=7)
Wasip1/Run/src_encoding_csv.test-10            20.05m ± 4%     19.55m ± 1%    -2.50% (p=0.001 n=7)
Wasip1/Compile/src_encoding_gob.test-10         1.991 ± 0%      1.952 ± 0%    -1.97% (p=0.001 n=7)
Wasip1/Run/src_encoding_gob.test-10             9.970 ±  ∞ ¹    9.764 ±  ∞ ¹  -2.07% (p=0.016 n=4+5)
geomean                                        309.9m          304.2m         -1.84%
¹ need >= 6 samples for confidence interval at level 0.95

                                            │ old_wasip1.txt  │             new_wasip1.txt              │
                                            │      B/op       │      B/op       vs base                 │
Wasip1/Compile/src_archive_tar.test-10        104.22Mi ± 0%     93.65Mi ± 0%    -10.14% (p=0.001 n=7)
Wasip1/Run/src_archive_tar.test-10             286.0Mi ± 0%     286.0Mi ± 0%          ~ (p=0.971 n=7)
Wasip1/Compile/src_bufio.test-10               81.91Mi ± 0%     74.57Mi ± 0%     -8.95% (p=0.001 n=7)
Wasip1/Run/src_bufio.test-10                   105.3Mi ± 0%     105.3Mi ± 0%          ~ (p=0.135 n=7)
Wasip1/Compile/src_bytes.test-10               83.42Mi ± 0%     75.77Mi ± 0%     -9.17% (p=0.001 n=7)
Wasip1/Run/src_bytes.test-10                   605.0Mi ± 0%     605.0Mi ± 0%          ~ (p=0.890 n=7)
Wasip1/Compile/src_context.test-10             86.57Mi ± 0%     78.52Mi ± 0%     -9.30% (p=0.001 n=7)
Wasip1/Run/src_context.test-10                 71.52Mi ± 0%     71.52Mi ± 0%          ~ (p=0.737 n=7)
Wasip1/Compile/src_encoding_ascii85.test-10    77.77Mi ± 0%     70.83Mi ± 0%     -8.92% (p=0.001 n=7)
Wasip1/Run/src_encoding_ascii85.test-10        69.21Mi ± 0%     69.21Mi ± 0%     -0.00% (p=0.001 n=7)
Wasip1/Compile/src_encoding_asn1.test-10       84.42Mi ± 0%     75.93Mi ± 0%    -10.06% (p=0.001 n=7)
Wasip1/Run/src_encoding_asn1.test-10           70.30Mi ± 0%     70.30Mi ± 0%     -0.00% (p=0.011 n=7)
Wasip1/Compile/src_encoding_base32.test-10     79.55Mi ± 0%     72.31Mi ± 0%     -9.10% (p=0.001 n=7)
Wasip1/Run/src_encoding_base32.test-10         104.4Mi ± 0%     104.4Mi ± 0%          ~ (p=0.109 n=7)
Wasip1/Compile/src_encoding_base64.test-10     79.99Mi ± 0%     72.55Mi ± 0%     -9.30% (p=0.001 n=7)
Wasip1/Run/src_encoding_base64.test-10         69.50Mi ± 0%     69.50Mi ± 0%     -0.00% (p=0.002 n=7)
Wasip1/Compile/src_encoding_binary.test-10     80.86Mi ± 0%     73.49Mi ± 0%     -9.11% (p=0.001 n=7)
Wasip1/Run/src_encoding_binary.test-10         69.78Mi ± 0%     69.78Mi ± 0%          ~ (p=0.333 n=7)
Wasip1/Compile/src_encoding_csv.test-10        79.89Mi ± 0%     72.49Mi ± 0%     -9.26% (p=0.001 n=7)
Wasip1/Run/src_encoding_csv.test-10            69.51Mi ± 0%     69.51Mi ± 0%     -0.00% (p=0.001 n=7)
Wasip1/Compile/src_encoding_gob.test-10        93.46Mi ± 0%     84.85Mi ± 0%     -9.21% (p=0.001 n=7)
Wasip1/Run/src_encoding_gob.test-10            4.784Gi ±  ∞ ¹   4.784Gi ±  ∞ ¹        ~ (p=0.524 n=4+5)
geomean                                        113.7Mi          108.3Mi          -4.78%
¹ need >= 6 samples for confidence interval at level 0.95

                                            │ old_wasip1.txt │              new_wasip1.txt              │
                                            │   allocs/op    │   allocs/op    vs base                   │
Wasip1/Compile/src_archive_tar.test-10         335.0k ± 0%     266.5k ± 0%    -20.45% (p=0.001 n=7)
Wasip1/Run/src_archive_tar.test-10             7.837k ± 0%     7.836k ± 0%          ~ (p=0.409 n=7)
Wasip1/Compile/src_bufio.test-10               243.5k ± 0%     196.1k ± 0%    -19.45% (p=0.001 n=7)
Wasip1/Run/src_bufio.test-10                   3.728k ± 0%     3.728k ± 0%          ~ (p=1.000 n=7)   ¹
Wasip1/Compile/src_bytes.test-10               254.2k ± 0%     204.6k ± 0%    -19.51% (p=0.001 n=7)
Wasip1/Run/src_bytes.test-10                   6.377k ± 0%     6.377k ± 0%          ~ (p=1.000 n=7)
Wasip1/Compile/src_context.test-10             274.4k ± 0%     222.4k ± 0%    -18.98% (p=0.001 n=7)
Wasip1/Run/src_context.test-10                 3.814k ± 1%     3.814k ± 1%          ~ (p=1.000 n=7)
Wasip1/Compile/src_encoding_ascii85.test-10    227.8k ± 0%     183.1k ± 0%    -19.63% (p=0.001 n=7)
Wasip1/Run/src_encoding_ascii85.test-10        2.707k ± 0%     2.705k ± 0%     -0.07% (p=0.001 n=7)
Wasip1/Compile/src_encoding_asn1.test-10       254.4k ± 0%     199.7k ± 0%    -21.52% (p=0.001 n=7)
Wasip1/Run/src_encoding_asn1.test-10           2.990k ± 0%     2.989k ± 0%          ~ (p=0.086 n=7)
Wasip1/Compile/src_encoding_base32.test-10     233.5k ± 0%     186.8k ± 0%    -20.01% (p=0.001 n=7)
Wasip1/Run/src_encoding_base32.test-10         2.978k ± 0%     2.972k ± 0%          ~ (p=0.070 n=7)
Wasip1/Compile/src_encoding_base64.test-10     235.7k ± 0%     187.6k ± 0%    -20.39% (p=0.001 n=7)
Wasip1/Run/src_encoding_base64.test-10         2.912k ± 0%     2.910k ± 0%     -0.07% (p=0.008 n=7)
Wasip1/Compile/src_encoding_binary.test-10     241.0k ± 0%     193.0k ± 0%    -19.91% (p=0.001 n=7)
Wasip1/Run/src_encoding_binary.test-10         3.069k ± 0%     3.069k ± 0%          ~ (p=0.583 n=7)
Wasip1/Compile/src_encoding_csv.test-10        236.2k ± 0%     188.3k ± 0%    -20.30% (p=0.001 n=7)
Wasip1/Run/src_encoding_csv.test-10            2.938k ± 0%     2.933k ± 0%     -0.17% (p=0.001 n=7)
Wasip1/Compile/src_encoding_gob.test-10        286.7k ± 0%     231.2k ± 0%    -19.37% (p=0.001 n=7)
Wasip1/Run/src_encoding_gob.test-10            10.66k ±  ∞ ²   10.66k ±  ∞ ²        ~ (p=0.524 n=4+5)
geomean                                        32.13k          28.74k         -10.56%
¹ all samples are equal
² need >= 6 samples for confidence interval at level 0.95
```


### TinyGo
```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero/internal/integration_test/stdlibs
                                        │ old_tinygo.txt │            new_tinygo.txt             │
                                        │     sec/op     │    sec/op      vs base                │
TinyGo/Compile/container_heap.test-10      427.7m ± 1%     419.5m ± 2%    -1.92% (p=0.001 n=7)
TinyGo/Run/container_heap.test-10          14.33m ± 0%     14.36m ± 1%         ~ (p=0.259 n=7)
TinyGo/Compile/container_list.test-10      425.5m ± 2%     418.0m ± 0%    -1.76% (p=0.001 n=7)
TinyGo/Run/container_list.test-10          14.15m ± 1%     14.19m ± 0%         ~ (p=0.710 n=7)
TinyGo/Compile/container_ring.test-10      419.0m ± 5%     411.9m ± 1%    -1.69% (p=0.001 n=7)
TinyGo/Run/container_ring.test-10          14.19m ± 0%     14.15m ± 1%         ~ (p=0.097 n=7)
TinyGo/Compile/crypto_des.test-10          435.9m ± 1%     427.5m ± 0%    -1.94% (p=0.001 n=7)
TinyGo/Run/crypto_des.test-10              18.16m ± 1%     18.16m ± 4%         ~ (p=0.902 n=7)
TinyGo/Compile/crypto_md5.test-10          433.8m ± 1%     425.7m ± 0%    -1.88% (p=0.001 n=7)
TinyGo/Run/crypto_md5.test-10              20.44m ± 0%     20.48m ± 0%         ~ (p=0.318 n=7)
TinyGo/Compile/crypto_rc4.test-10          417.4m ± 0%     410.0m ± 1%    -1.79% (p=0.001 n=7)
TinyGo/Run/crypto_rc4.test-10              160.4m ± 0%     161.0m ± 0%         ~ (p=0.073 n=7)
TinyGo/Compile/crypto_sha1.test-10         432.5m ± 0%     425.1m ± 1%    -1.71% (p=0.001 n=7)
TinyGo/Run/crypto_sha1.test-10             15.98m ± 1%     15.96m ± 1%         ~ (p=0.710 n=7)
TinyGo/Compile/crypto_sha256.test-10       439.4m ± 0%     432.2m ± 1%    -1.64% (p=0.001 n=7)
TinyGo/Run/crypto_sha256.test-10           16.08m ± 1%     16.14m ± 1%         ~ (p=0.318 n=7)
TinyGo/Compile/crypto_sha512.test-10       440.6m ± 0%     433.1m ± 3%    -1.71% (p=0.026 n=7)
TinyGo/Run/crypto_sha512.test-10           18.77m ± 4%     18.66m ± 0%         ~ (p=0.128 n=7)
TinyGo/Compile/encoding_ascii85.test-10    431.0m ± 0%     423.7m ± 0%    -1.68% (p=0.001 n=7)
TinyGo/Run/encoding_ascii85.test-10        14.83m ± 0%     14.86m ± 2%         ~ (p=0.902 n=7)
TinyGo/Compile/encoding_base32.test-10      1.098 ± 1%      1.095 ± 1%    -0.21% (p=0.007 n=7)
TinyGo/Run/encoding_base32.test-10         85.30m ± 1%     90.91m ± 4%    +6.57% (p=0.001 n=7)
TinyGo/Compile/encoding_csv.test-10        467.7m ± 0%     462.8m ± 4%         ~ (p=0.209 n=7)
TinyGo/Run/encoding_csv.test-10            22.70m ± 1%     22.93m ± 3%    +1.03% (p=0.002 n=7)
TinyGo/Compile/encoding_hex.test-10        448.6m ± 0%     440.9m ± 0%    -1.71% (p=0.001 n=7)
TinyGo/Run/encoding_hex.test-10           10.081m ± 1%     9.986m ± 1%    -0.94% (p=0.001 n=7)
TinyGo/Compile/go_scanner.test-10          477.1m ± 0%     467.6m ± 1%    -1.99% (p=0.001 n=7)
TinyGo/Run/go_scanner.test-10              16.84m ± 1%     16.85m ± 0%         ~ (p=1.000 n=7)
TinyGo/Compile/hash.test-10                683.4m ± 2%     671.7m ± 1%    -1.72% (p=0.001 n=7)
TinyGo/Run/hash.test-10                    16.31m ± 0%     16.31m ± 1%         ~ (p=0.805 n=7)
TinyGo/Compile/hash_adler32.test-10        417.2m ± 0%     410.1m ± 3%    -1.70% (p=0.026 n=7)
TinyGo/Run/hash_adler32.test-10            24.49m ± 0%     24.71m ± 0%    +0.89% (p=0.001 n=7)
TinyGo/Compile/hash_crc64.test-10          644.9m ± 1%     637.8m ± 1%    -1.09% (p=0.001 n=7)
TinyGo/Run/hash_crc64.test-10              17.52m ± 1%     17.46m ± 1%         ~ (p=0.165 n=7)
TinyGo/Compile/hash_fnv.test-10            438.7m ± 0%     430.5m ± 2%    -1.87% (p=0.001 n=7)
TinyGo/Run/hash_fnv.test-10                14.86m ± 1%     14.77m ± 0%    -0.62% (p=0.002 n=7)
TinyGo/Compile/html.test-10                 2.193 ± 1%      2.173 ± 1%         ~ (p=0.128 n=7)
TinyGo/Run/html.test-10                    16.00m ± 2%     16.04m ± 1%         ~ (p=0.710 n=7)
TinyGo/Compile/internal_itoa.test-10       415.9m ± 4%     407.4m ± 1%    -2.04% (p=0.001 n=7)
TinyGo/Run/internal_itoa.test-10           14.32m ±  ∞ ¹   14.24m ±  ∞ ¹       ~ (p=0.800 n=4+1)
geomean                                    101.3m          100.7m         -0.64%
¹ need >= 6 samples for confidence interval at level 0.95

                                        │ old_tinygo.txt │             new_tinygo.txt             │
                                        │      B/op      │      B/op       vs base                │
TinyGo/Compile/container_heap.test-10     53.28Mi ± 0%     49.21Mi ± 0%    -7.63% (p=0.001 n=7)
TinyGo/Run/container_heap.test-10         16.63Mi ± 0%     16.63Mi ± 0%         ~ (p=0.535 n=7)
TinyGo/Compile/container_list.test-10     53.23Mi ± 0%     49.18Mi ± 0%    -7.61% (p=0.001 n=7)
TinyGo/Run/container_list.test-10         16.40Mi ± 0%     16.40Mi ± 0%         ~ (p=1.000 n=7)
TinyGo/Compile/container_ring.test-10     52.47Mi ± 0%     48.43Mi ± 0%    -7.70% (p=0.001 n=7)
TinyGo/Run/container_ring.test-10         16.30Mi ± 0%     16.30Mi ± 0%         ~ (p=0.902 n=7)
TinyGo/Compile/crypto_des.test-10         53.43Mi ± 0%     49.31Mi ± 0%    -7.70% (p=0.001 n=7)
TinyGo/Run/crypto_des.test-10             16.76Mi ± 0%     16.76Mi ± 0%         ~ (p=0.073 n=7)
TinyGo/Compile/crypto_md5.test-10         53.55Mi ± 0%     49.39Mi ± 0%    -7.76% (p=0.001 n=7)
TinyGo/Run/crypto_md5.test-10             44.97Mi ± 0%     44.97Mi ± 0%         ~ (p=0.833 n=7)
TinyGo/Compile/crypto_rc4.test-10         52.45Mi ± 0%     48.41Mi ± 0%    -7.71% (p=0.001 n=7)
TinyGo/Run/crypto_rc4.test-10             29.28Mi ± 0%     29.28Mi ± 0%         ~ (p=0.477 n=7)
TinyGo/Compile/crypto_sha1.test-10        53.76Mi ± 0%     49.63Mi ± 0%    -7.69% (p=0.001 n=7)
TinyGo/Run/crypto_sha1.test-10            17.44Mi ± 0%     17.44Mi ± 0%         ~ (p=1.000 n=7)
TinyGo/Compile/crypto_sha256.test-10      53.61Mi ± 0%     49.47Mi ± 0%    -7.72% (p=0.001 n=7)
TinyGo/Run/crypto_sha256.test-10          17.53Mi ± 0%     17.53Mi ± 0%         ~ (p=1.000 n=7)
TinyGo/Compile/crypto_sha512.test-10      53.59Mi ± 0%     49.47Mi ± 0%    -7.69% (p=0.001 n=7)
TinyGo/Run/crypto_sha512.test-10          17.82Mi ± 0%     17.82Mi ± 0%         ~ (p=0.165 n=7)
TinyGo/Compile/encoding_ascii85.test-10   53.38Mi ± 0%     49.25Mi ± 0%    -7.74% (p=0.001 n=7)
TinyGo/Run/encoding_ascii85.test-10       16.54Mi ± 0%     16.54Mi ± 0%         ~ (p=0.175 n=7)
TinyGo/Compile/encoding_base32.test-10    60.78Mi ± 0%     56.25Mi ± 0%    -7.45% (p=0.001 n=7)
TinyGo/Run/encoding_base32.test-10        23.75Mi ± 0%     23.75Mi ± 0%         ~ (p=0.682 n=7)
TinyGo/Compile/encoding_csv.test-10       54.34Mi ± 0%     49.87Mi ± 0%    -8.23% (p=0.001 n=7)
TinyGo/Run/encoding_csv.test-10           11.71Mi ± 0%     11.71Mi ± 0%         ~ (p=0.221 n=7)
TinyGo/Compile/encoding_hex.test-10       53.78Mi ± 0%     49.54Mi ± 0%    -7.88% (p=0.001 n=7)
TinyGo/Run/encoding_hex.test-10           8.264Mi ± 0%     8.263Mi ± 0%         ~ (p=0.209 n=7)
TinyGo/Compile/go_scanner.test-10         55.27Mi ± 0%     50.76Mi ± 0%    -8.16% (p=0.001 n=7)
TinyGo/Run/go_scanner.test-10             18.52Mi ± 0%     18.52Mi ± 0%         ~ (p=0.535 n=7)
TinyGo/Compile/hash.test-10               58.10Mi ± 0%     53.50Mi ± 0%    -7.93% (p=0.001 n=7)
TinyGo/Run/hash.test-10                   18.22Mi ± 0%     18.22Mi ± 0%         ~ (p=0.209 n=7)
TinyGo/Compile/hash_adler32.test-10       52.85Mi ± 0%     48.79Mi ± 0%    -7.69% (p=0.001 n=7)
TinyGo/Run/hash_adler32.test-10           21.36Mi ± 0%     21.36Mi ± 0%         ~ (p=0.318 n=7)
TinyGo/Compile/hash_crc64.test-10         57.30Mi ± 0%     53.08Mi ± 0%    -7.36% (p=0.001 n=7)
TinyGo/Run/hash_crc64.test-10             16.47Mi ± 0%     16.47Mi ± 0%    -0.00% (p=0.017 n=7)
TinyGo/Compile/hash_fnv.test-10           53.50Mi ± 0%     49.35Mi ± 0%    -7.75% (p=0.001 n=7)
TinyGo/Run/hash_fnv.test-10               16.69Mi ± 0%     16.69Mi ± 0%    +0.00% (p=0.017 n=7)
TinyGo/Compile/html.test-10               163.8Mi ± 0%     159.8Mi ± 0%    -2.45% (p=0.001 n=7)
TinyGo/Run/html.test-10                   18.69Mi ± 0%     18.69Mi ± 0%         ~ (p=0.710 n=7)
TinyGo/Compile/internal_itoa.test-10      52.37Mi ± 0%     48.35Mi ± 0%    -7.67% (p=0.001 n=7)
TinyGo/Run/internal_itoa.test-10          16.16Mi ±  ∞ ¹   16.16Mi ±  ∞ ¹       ~ (p=0.800 n=4+1)
geomean                                   32.08Mi          30.86Mi         -3.81%
¹ need >= 6 samples for confidence interval at level 0.95

                                        │ old_tinygo.txt │             new_tinygo.txt             │
                                        │   allocs/op    │   allocs/op    vs base                 │
TinyGo/Compile/container_heap.test-10     110.19k ± 0%     85.06k ± 0%    -22.80% (p=0.001 n=7)
TinyGo/Run/container_heap.test-10          374.9k ± 0%     374.9k ± 0%          ~ (p=0.869 n=7)
TinyGo/Compile/container_list.test-10     109.76k ± 0%     84.83k ± 0%    -22.71% (p=0.001 n=7)
TinyGo/Run/container_list.test-10          370.0k ± 0%     370.0k ± 0%          ~ (p=0.636 n=7)
TinyGo/Compile/container_ring.test-10     109.61k ± 0%     84.69k ± 0%    -22.73% (p=0.001 n=7)
TinyGo/Run/container_ring.test-10          367.6k ± 0%     367.6k ± 0%          ~ (p=0.213 n=7)
TinyGo/Compile/crypto_des.test-10         110.51k ± 0%     85.08k ± 0%    -23.01% (p=0.001 n=7)
TinyGo/Run/crypto_des.test-10              378.1k ± 0%     378.1k ± 0%          ~ (p=0.286 n=7)
TinyGo/Compile/crypto_md5.test-10         110.78k ± 0%     85.27k ± 0%    -23.03% (p=0.001 n=7)
TinyGo/Run/crypto_md5.test-10              393.3k ± 0%     393.3k ± 0%          ~ (p=1.000 n=7)
TinyGo/Compile/crypto_rc4.test-10         109.68k ± 0%     84.82k ± 0%    -22.67% (p=0.001 n=7)
TinyGo/Run/crypto_rc4.test-10              367.1k ± 0%     367.1k ± 0%          ~ (p=0.396 n=7)
TinyGo/Compile/crypto_sha1.test-10        110.95k ± 0%     85.47k ± 0%    -22.96% (p=0.001 n=7)
TinyGo/Run/crypto_sha1.test-10             392.7k ± 0%     392.7k ± 0%          ~ (p=0.266 n=7)
TinyGo/Compile/crypto_sha256.test-10      110.80k ± 0%     85.32k ± 0%    -23.00% (p=0.001 n=7)
TinyGo/Run/crypto_sha256.test-10           394.5k ± 0%     394.5k ± 0%          ~ (p=1.000 n=7)
TinyGo/Compile/crypto_sha512.test-10      110.87k ± 0%     85.34k ± 0%    -23.02% (p=0.001 n=7)
TinyGo/Run/crypto_sha512.test-10           397.2k ± 0%     397.2k ± 0%          ~ (p=1.000 n=7)
TinyGo/Compile/encoding_ascii85.test-10   110.44k ± 0%     84.90k ± 0%    -23.13% (p=0.001 n=7)
TinyGo/Run/encoding_ascii85.test-10        373.0k ± 0%     373.0k ± 0%          ~ (p=0.636 n=7)
TinyGo/Compile/encoding_base32.test-10    116.55k ± 0%     88.68k ± 0%    -23.91% (p=0.001 n=7)
TinyGo/Run/encoding_base32.test-10         397.6k ± 0%     397.7k ± 0%          ~ (p=0.551 n=7)
TinyGo/Compile/encoding_csv.test-10       113.67k ± 0%     86.20k ± 0%    -24.16% (p=0.001 n=7)
TinyGo/Run/encoding_csv.test-10            213.4k ± 0%     213.4k ± 0%          ~ (p=1.000 n=7)
TinyGo/Compile/encoding_hex.test-10       111.61k ± 0%     85.39k ± 0%    -23.49% (p=0.001 n=7)
TinyGo/Run/encoding_hex.test-10            178.4k ± 0%     178.4k ± 0%     -0.00% (p=0.021 n=7)
TinyGo/Compile/go_scanner.test-10         114.33k ± 0%     86.48k ± 0%    -24.37% (p=0.001 n=7)
TinyGo/Run/go_scanner.test-10              420.7k ± 0%     420.7k ± 0%          ~ (p=0.298 n=7)
TinyGo/Compile/hash.test-10               118.17k ± 0%     89.60k ± 0%    -24.17% (p=0.001 n=7)
TinyGo/Run/hash.test-10                    410.7k ± 0%     410.7k ± 0%          ~ (p=0.714 n=7)
TinyGo/Compile/hash_adler32.test-10       109.75k ± 0%     84.65k ± 0%    -22.87% (p=0.001 n=7)
TinyGo/Run/hash_adler32.test-10            368.6k ± 0%     368.6k ± 0%          ~ (p=0.147 n=7)
TinyGo/Compile/hash_crc64.test-10         113.59k ± 0%     87.48k ± 0%    -22.99% (p=0.001 n=7)
TinyGo/Run/hash_crc64.test-10              371.1k ± 0%     371.1k ± 0%          ~ (p=0.122 n=7)
TinyGo/Compile/hash_fnv.test-10           110.77k ± 0%     85.18k ± 0%    -23.11% (p=0.001 n=7)
TinyGo/Run/hash_fnv.test-10                376.0k ± 0%     376.0k ± 0%          ~ (p=0.462 n=7)
TinyGo/Compile/html.test-10                327.9k ± 0%     302.4k ± 0%     -7.79% (p=0.001 n=7)
TinyGo/Run/html.test-10                    414.3k ± 0%     414.3k ± 0%          ~ (p=0.702 n=7)
TinyGo/Compile/internal_itoa.test-10      109.25k ± 0%     84.56k ± 0%    -22.59% (p=0.001 n=7)
TinyGo/Run/internal_itoa.test-10           364.4k ±  ∞ ¹   364.4k ±  ∞ ¹        ~ (p=1.200 n=4+1)
geomean                                    205.8k          181.2k         -11.96%
¹ need >= 6 samples for confidence interval at level 0.95
```

### Compiling wazero (compiled as wasip1) itself
```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │             new.txt              │
               │   sec/op   │   sec/op    vs base              │
Compilation-10   2.537 ± 1%   2.485 ± 0%  -2.04% (p=0.001 n=7)

               │   old.txt    │              new.txt               │
               │     B/op     │     B/op      vs base              │
Compilation-10   354.6Mi ± 0%   341.0Mi ± 0%  -3.83% (p=0.001 n=7)

               │   old.txt   │              new.txt               │
               │  allocs/op  │  allocs/op   vs base               │
Compilation-10   694.6k ± 0%   606.8k ± 0%  -12.64% (p=0.001 n=7)
```


Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-03 17:00:10 -07:00
Takeshi Yoneda
5a2fe5b122 doc: alternate signal stack setup for c-archive or c-shared builds (#2225)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-02 15:16:43 -07:00
Takeshi Yoneda
2092c0a879 Runs the test case previously failing due to a bug in Rosseta 2 (#2224)
This case has been skipped due to a bug I found in Rosetta 2.
The bug was fixed in the latest macOS, so enable it now.

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-06-01 12:45:45 -07:00
Yage Hu
4201f5442a Disallow empty path on path_open (#2223)
Signed-off-by: Yage Hu <me@huyage.dev>
2024-05-29 10:22:12 +02:00
Takeshi Yoneda
d4a49031b6 cache: includes cpu features in cache keys (#2220)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-28 17:44:05 +09:00
Takeshi Yoneda
0b543f7ba4 doc: clarify WithCloseOnContextDone closes api.Module (#2221)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-28 17:35:53 +09:00
Takeshi Yoneda
c397a402ad mmap: eliminates dead flag (#2219)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-28 09:44:12 +09:00
Nuno Cruces
d34df000c5 Maps ERROR_NOT_A_REPARSE_POINT to EINVAL (#2218) 2024-05-27 22:07:38 +09:00
Takeshi Yoneda
4dfb1f5b26 Propagates api.Memory.Grow by users to ModuleEngine (#2216)
Since the introduction of optimizing compiler, the Memory.Grow by the users,
which has the different call path than memory.grow instruction, didn't propagate
the growth result onto compiler's ModuleInstance.

Fixes #2215

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-27 10:37:03 +09:00
Takeshi Yoneda
eb24363d34 ssa: empirically faster passRedundantPhiEliminationOpt (#2214)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-23 16:12:40 +09:00
Takeshi Yoneda
3383f44a8f arm64: reduces the struct size of instructions (#2213)
This makes arm64's instruction data structure smaller, and 
makes it more aligned with amd64. As a result, the compilation 
gets slightly faster and uses 10% less memory space for 
compiling wazero itself.

```
goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │             new.txt              │
               │   sec/op   │   sec/op    vs base              │
Compilation-10   3.444 ± 2%   3.315 ± 1%  -3.75% (p=0.001 n=7)

               │   old.txt    │              new.txt               │
               │     B/op     │     B/op      vs base              │
Compilation-10   391.2Mi ± 0%   354.7Mi ± 0%  -9.35% (p=0.001 n=7)

               │   old.txt   │              new.txt              │
               │  allocs/op  │  allocs/op   vs base              │
Compilation-10   693.3k ± 0%   695.3k ± 0%  +0.28% (p=0.001 n=7)
```

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-22 10:57:25 +09:00
Takeshi Yoneda
b9633563c0 ssa: simplifies basicBlock.params (#2212)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-21 15:51:41 +09:00
Takeshi Yoneda
ab0d27c180 regalloc: removes map use for less memory pressure (#2211)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-21 14:51:27 +09:00
Takeshi Yoneda
48f702e154 experimental: removes deprecated raw context keys (#2206)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-13 09:36:03 +09:00
Takeshi Yoneda
5a8a053bff Merges interpreter and wazeroir packages (#2204)
Some checks failed
Release CLI / Pre-release build (push) Has been cancelled
Release CLI / Pre-release test (macos-12) (push) Has been cancelled
Release CLI / Pre-release test (ubuntu-22.04) (push) Has been cancelled
Release CLI / Pre-release test (windows-2022) (push) Has been cancelled
Release CLI / Release (push) Has been cancelled
v1.7.2
2024-05-07 17:31:03 +09:00
Takeshi Yoneda
bc0915e051 integration test: adds memmov regression tests (#2203)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-07 14:51:21 +09:00
Takeshi Yoneda
3403dd3061 amd64: saves clobbered xmm8-xmm15 beyond runtime.memmove (#2202)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-06 15:17:07 +09:00
Takeshi Yoneda
bac8bd1f58 fuzz: adds regression case for #2198 (#2201)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-05-05 15:20:57 +09:00
Takeshi Yoneda
b7df8b1130 debug: do not include inlined sources in frame counts (#2199)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-30 17:23:46 +09:00
Takeshi Yoneda
60dbe962c1 Assumes ctx is not nil (#2196)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-24 08:42:25 +09:00
Takeshi Yoneda
1e6080ab98 compiler: uses slice instead of map for refToBinaryOffset (#2195)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-23 10:32:34 +09:00
Takeshi Yoneda
621f62d5a4 Fixes race condition in concurrent engine usage (#2194)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-22 16:10:04 +09:00
Takeshi Yoneda
7ad2b70626 Removes GOOS=js related leftovers (#2193)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-22 11:17:10 +09:00
Anuraag (Rag) Agrawal
5a9cb5aaf8 experimental: reflect custom allocated buffer capacity to internal buffer (#2189)
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
2024-04-17 16:48:37 +09:00
Takeshi Yoneda
faae9b62cf Removes old engine/wazevo/README.md (#2188)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-16 16:28:43 +09:00
Nuno Cruces
55f21b8678 experimental: custom memory allocator API tweaks (#2186)
Some checks failed
Release CLI / Pre-release build (push) Has been cancelled
Release CLI / Pre-release test (macos-12) (push) Has been cancelled
Release CLI / Pre-release test (ubuntu-22.04) (push) Has been cancelled
Release CLI / Pre-release test (windows-2022) (push) Has been cancelled
Release CLI / Release (push) Has been cancelled
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
v1.7.1
2024-04-16 08:45:04 +09:00
Takeshi Yoneda
e9bea5593a Updates CODEOWNERS (#2185)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-15 15:32:58 +09:00
Takeshi Yoneda
a3d0d967ab Cleanups ctxkey package (#2184)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-15 14:55:14 +09:00
Takeshi Yoneda
378956d2fd compiler(arm64): fixes B.cond offset limits (#2183)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-15 14:20:05 +09:00
Nuno Cruces
a0fbb18544 experimental: configure custom memory allocator (#2177)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
2024-04-10 20:13:57 +09:00
Takeshi Yoneda
891e470b72 compiler(arm64): fixes overflow in huge executable relocations (#2181)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-10 09:59:35 +09:00
Anuraag (Rag) Agrawal
f31be308fa Fix WithSnapshotter doc to reference non-deprecated method (#2180)
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
2024-04-09 13:40:08 +09:00
Nuno Cruces
c6a907bb9d experimental: cleanup context keys (#2175)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
2024-04-06 21:04:55 +09:00
Nuno Cruces
59faf80fcc threads: remove dead code (#2176)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
2024-04-06 10:27:34 +09:00
Takeshi Yoneda
775330a1e5 Reverts the public Memory.Pages API (#2174)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-04 21:57:48 +09:00
Takeshi Yoneda
5fe44456ad Renames PageSize -> Pages (#2173)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-04 20:37:11 +09:00
Nuno Cruces
864a958c46 fix: workaround Memory.Size() overflow with 4GB memory (#2172)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
2024-04-04 12:08:20 +01:00
Nuno Cruces
a030b61c62 fix: allow ReadByte/WriteByte to get last byte of 4GB memory (#2171)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
2024-04-04 11:28:03 +01:00
Takeshi Yoneda
144d59f8d5 threads: stop explicit use of mmap for shared memory (#2170)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-04 13:30:15 +09:00
Milan Nikolic
15e1eb7209 docs: add image libraries to community users (#2168)
Signed-off-by: Milan Nikolic <gen2brain@gmail.com>
2024-04-02 09:54:40 +09:00
Takeshi Yoneda
4d6585d7da wazevo(arm64): adds assertion on too large relocations (#2167)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-01 14:42:09 +09:00
Ron Evans
22e3861510 internal: add tags and stubs so wazero can be compiled for MCU targets (#2166)
Signed-off-by: deadprogram <ron@hybridgroup.com>
2024-03-31 11:11:31 +02:00
Gram
9cdb0e32a2 ci: build wazero with TinyGo (#2163)
Signed-off-by: gram <git@orsinium.dev>
2024-03-28 13:20:08 +01:00
Gram
199c858f74 refactor reflect.SliceHeader uses to allow tinygo cross-compilation (#2161)
Signed-off-by: gram <git@orsinium.dev>
2024-03-28 12:16:35 +01:00