mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 22:58:40 +01:00
Previously, fibers had a hard-coded limit to how big their stack size is. This limit exists in two forms: the number of distinct call frames (basically the maximum call depth), and the number of unique stack slots. This fixes the first half of this by dynamically allocating the call frame array and growing it as needed. This makes new fibers smallers since they can start with a very small array. Checking and growing as needed doesn't noticeably regress the perf on the other benchmarks, and it makes a new fiber benchmark about 45% faster. The stack array is still hardcoded, but that will be in another commit.