Skip to content

0.713

Choose a tag to compare

@github-actions github-actions released this 20 Mar 20:45
Immutable release. Only release title and notes can be modified.
b37af21

Hey folks! Another week another Luau release 🙂

Analysis

  • InsertionOrderedMap has been moved from the Analysis library to Common.
  • Subtyping has been rewritten to avoid extra allocations: there should be no behavioral change from this effort, only somewhat lower memory pressure.
  • Fixed a bug where analyzing comparing a value that is too complex to type check against nil may cause the type checker to crash.
  • pcall now handles functions that return no values, for example:
local mod = require('mymodule')

-- Previously, we would error claiming that we only expect one value on the left-hand-side.
-- Now, there is no error and `result` is typed as `unknown`.
local success, result = pcall(function()
    mod.dothething()
end)

Compiler

  • Fixed a bug in const where function statements were excluded from const checks. Fixes #2282
const a = 42
-- The following will now fail to compile.
function a()
end
  • Table literal "shapes" can now encorporate constant values at bytecode compile time. We store the shape of constant tables if all their keys are constants, which allows slightly faster insertion when building said literals (we can preallocate a table in a particular shape). Now, we can also store constant values, making construction a single bytecode. For example:
-- This snippet ...
return { x = 1, y = 2 }
-- ... used to compile to bytecode like ...
DUPTABLE R0 2
LOADN R1 1
SETTABLEKS R1 R0 K0 ['x']
LOADN R1 2
SETTABLEKS R1 R0 K1 ['y']
RETURN R0 1
-- ... and now compiles to something like ...
DUPTABLE R0 4
RETURN R0 1

Runtime

  • Introduced a @debugnoinline attribute behind a debug flag. We do not actively plan to ship this but have added it to help test compiler and runtime optimizations.
  • Fixed a bug where setting a breakpoint in a natively compiled function could crash on ARM64.
  • NCG: The data section of generated code is no longer allocated as executable, preventing a class of potential exploits.

Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Ariel Weiss arielweiss@roblox.com
Co-authored-by: David Cope dcope@roblox.com
Co-authored-by: Hunter Goldstein hgoldstein@roblox.com
Co-authored-by: Ilya Rezvov irezvov@roblox.com
Co-authored-by: Tom Schollenberger tschollenberger@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Karim Mouline kmouline@roblox.com