Fix regression - was using the wrong error when blocking recursion and treating as real error instead of stop recursion fallback

This commit is contained in:
Nathan Braswell
2022-04-25 09:19:14 -04:00
parent 223147f699
commit d420b6491f
3 changed files with 13 additions and 11 deletions

View File

@@ -46,11 +46,11 @@ popd
hyperfine --warmup 2 --export-markdown table.md \ hyperfine --warmup 2 --export-markdown table.md \
'echo '$NUMBER' | wasmtime ./fib_compiled.wasm' 'echo '$NUMBER' | wasmtime ./fib_compiled_let.wasm' \ 'echo '$NUMBER' | wasmtime ./fib_compiled.wasm' 'echo '$NUMBER' | wasmtime ./fib_compiled_let.wasm' \
'echo '$NUMBER' | wasmtime ./builtin_fib.wasm' 'echo '$NUMBER' | wasmtime ./fib_compiled_manual.wasm' \
"scheme --script ./fib.scm $NUMBER" "scheme --script ./fib_let.scm $NUMBER" \ "scheme --script ./fib.scm $NUMBER" "scheme --script ./fib_let.scm $NUMBER" \
"python3 ./fib.py $NUMBER" "python3 ./fib_let.py $NUMBER" \ "python3 ./fib.py $NUMBER" "python3 ./fib_let.py $NUMBER" \
'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm' 'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm' \ 'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm' 'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm' \
#'echo '$NUMBER' | wasmtime ./builtin_fib.wasm' 'echo '$NUMBER' | wasmtime ./fib_compiled_manual.wasm' \
#'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm' 'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm' \ #'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm' 'echo '$NUMBER' | wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm' \
#'echo '$NUMBER' | ./rust_fib/target/debug/rust_let' 'echo '$NUMBER' | ./rust_fib/target/release/rust_let' \ #'echo '$NUMBER' | ./rust_fib/target/debug/rust_let' 'echo '$NUMBER' | ./rust_fib/target/release/rust_let' \
#'echo '$NUMBER' | wasmtime ./fib_interpreted.wasm' 'echo '$NUMBER' | wasmtime ./fib_interpreted_let.wasm' \ #'echo '$NUMBER' | wasmtime ./fib_interpreted.wasm' 'echo '$NUMBER' | wasmtime ./fib_interpreted_let.wasm' \

View File

@@ -4572,7 +4572,7 @@
(ctx (array datasi funcs memo env pectx inline_locals)) (ctx (array datasi funcs memo env pectx inline_locals))
) (array (mif e x pex) e ctx))))) ) (array (mif e x pex) err ctx)))))
((datasi funcs memo env pectx inline_locals) ctx) ((datasi funcs memo env pectx inline_locals) ctx)
(memo (put memo (.hash c) 'RECURSE_FAIL)) (memo (put memo (.hash c) 'RECURSE_FAIL))
(ctx (array datasi funcs memo env pectx inline_locals)) (ctx (array datasi funcs memo env pectx inline_locals))
@@ -4741,7 +4741,7 @@
((param_codes first_params_err ctx) (compile_params false ctx params)) ((param_codes first_params_err ctx) (compile_params false ctx params))
((func_val func_code func_err ctx) (compile-inner ctx func_value false inside_veval s_env_access_code inline_level)) ((func_val func_code func_err ctx) (compile-inner ctx func_value false inside_veval s_env_access_code inline_level))
((unval_param_codes err ctx) (compile_params true ctx params)) ((unval_param_codes err ctx) (compile_params true ctx params))
((bad_unval_params_msg_val _ _ ctx) (compile-inner ctx (marked_val (str "error was with unval-evaling parameters of " (str_strip c))) true inside_veval s_env_access_code inline_level)) ((bad_unval_params_msg_val _ _ ctx) (compile-inner ctx (marked_val (str "error was with unval-evaling parameters of " (true_str_strip c) " " err)) true inside_veval s_env_access_code inline_level))
(wrap_param_code (lambda (code) (concat (wrap_param_code (lambda (code) (concat
(local.get '$tmp) ; saving ito restore it (local.get '$tmp) ; saving ito restore it
code code

View File

@@ -1,10 +1,12 @@
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:| |:---|---:|---:|---:|---:|
| `echo 30 \| wasmtime ./fib_compiled.wasm` | 106.4 ± 4.2 | 102.8 | 122.5 | 5.68 ± 0.28 | | `echo 30 \| wasmtime ./fib_compiled.wasm` | 106.3 ± 1.7 | 103.8 | 111.8 | 8.18 ± 0.35 |
| `echo 30 \| wasmtime ./fib_compiled_let.wasm` | 138.8 ± 4.2 | 136.1 | 155.8 | 7.42 ± 0.31 | | `echo 30 \| wasmtime ./fib_compiled_let.wasm` | 142.1 ± 1.5 | 140.0 | 144.9 | 10.93 ± 0.45 |
| `scheme --script ./fib.scm 30` | 53.9 ± 0.8 | 52.8 | 56.1 | 2.88 ± 0.10 | | `echo 30 \| wasmtime ./builtin_fib.wasm` | 13.0 ± 0.5 | 11.7 | 14.7 | 1.00 |
| `scheme --script ./fib_let.scm 30` | 54.1 ± 0.8 | 53.1 | 57.3 | 2.89 ± 0.10 | | `echo 30 \| wasmtime ./fib_compiled_manual.wasm` | 305.9 ± 3.2 | 301.8 | 311.7 | 23.53 ± 0.98 |
| `python3 ./fib.py 30` | 286.5 ± 2.9 | 281.0 | 289.8 | 15.31 ± 0.48 | | `scheme --script ./fib.scm 30` | 53.9 ± 0.6 | 53.0 | 56.0 | 4.15 ± 0.17 |
| `python3 ./fib_let.py 30` | 300.9 ± 2.0 | 297.8 | 303.9 | 16.08 ± 0.49 | | `scheme --script ./fib_let.scm 30` | 54.0 ± 0.6 | 53.1 | 55.6 | 4.15 ± 0.17 |
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm` | 29.6 ± 0.7 | 28.7 | 33.2 | 1.58 ± 0.06 | | `python3 ./fib.py 30` | 287.6 ± 2.7 | 283.8 | 293.1 | 22.12 ± 0.91 |
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm` | 18.7 ± 0.6 | 17.7 | 21.1 | 1.00 | | `python3 ./fib_let.py 30` | 303.8 ± 2.9 | 300.5 | 308.0 | 23.37 ± 0.97 |
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm` | 29.7 ± 0.6 | 28.5 | 32.3 | 2.29 ± 0.10 |
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm` | 18.6 ± 0.4 | 17.8 | 19.8 | 1.43 ± 0.06 |