From bb8870a1d4bcf3a90ef2841c7a15324ed9c229c7 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 30 Aug 2021 10:31:52 -0700 Subject: [PATCH] Update compatibility.md (#63) Add a note about `pcall` - really the C limit is universal but it will most often be hit during either pcall or coroutine.resume. --- docs/_pages/compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_pages/compatibility.md b/docs/_pages/compatibility.md index 7439938..9e49efc 100644 --- a/docs/_pages/compatibility.md +++ b/docs/_pages/compatibility.md @@ -26,7 +26,7 @@ Luau has certain limitations around the number of local variables, registers, up - Constants: 2^23 per function (up from 2^18 in Lua 5.1) - Instructions: 2^23 per function (up from 2^17 in Lua 5.1, although in both cases the limit only applies to control flow) - Nested functions: 2^15 per function (down from 2^18 in Lua 5.1) -- Stack depth: 20000 Lua calls per Lua thread, 200 C calls per C thread (e.g. coroutine.resume nesting is limited to 200) +- Stack depth: 20000 Lua calls per Lua thread, 200 C calls per C thread (e.g. `coroutine.resume`/`pcall` nesting is limited to 200) Note that Lua 5.3 has a larger upvalue limit (255) and a larger constant limit (2^26); existing Luau limits are likely sufficient for reasonable use cases.