cleaned: implementation details of closures
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Wed, 14 Feb 2024 05:21:28 +0000 (23:21 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Wed, 14 Feb 2024 05:21:28 +0000 (23:21 -0600)
commitb50dd65eb462bea6d9de3a991d615a286a746791
tree62b8b3f5b6ef161102c5a273aabfc07312fbefed
parente2247f19c7e20a6f0aaec01d441a93c85ef934b7
cleaned: implementation details of closures

This change reduces the complexity of function closure by removing the `closure_size` property on functions, and instead moves this information into the first 8 bytes of the closure block that is allocated. This means that closure blocks are slightly larger, but this extra field that pushes complexity to the end user is eliminated. Net win.
compiler/src/checker.c
compiler/src/types.c
compiler/src/wasm_emit.c
compiler/src/wasm_type_table.h
core/alloc/alloc.onyx
core/runtime/platform/wasi/platform.onyx
core/runtime/platform/wasi/wasi_defs.onyx
core/runtime/platform/wasi/wasi_fs.onyx
core/runtime/platform/wasi/wasix_net.onyx
runtime/src/ort_threads.h