From 92942a2c54f996471ab666e415ad1189ddeb4b40 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Thu, 11 Jun 2020 21:19:19 -0700 Subject: [PATCH] docs: Document child function limit --- docs/compatibility.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/compatibility.md b/docs/compatibility.md index a7a1df17..084a9eca 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -23,6 +23,7 @@ Luau has certain limitations around the number of local variables, registers, up - Registers: 255 per function (same as all versions of Lua, this includes local variables and function arguments) - 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) 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.