Skip to content

0.731

Choose a tag to compare

@github-actions github-actions released this 24 Jul 21:11
Immutable release. Only release title and notes can be modified.
f8ca77a

General

  • Added support for building the Luau VM with double-precision vectors rather than single precision. Due to the extra space requirements, these are heap allocated rather than entirely stack allocated.
  • Several new C APIs that were previously internal have been added to the offcial interface:
    • lua_atbreakpoint - provides code called from a debug hook to check if are at a breakpoint instruction, useful to resume from single step mode
    • lua_allocationrate - determines the allocation rate of the VM in order to pace the GC externally
    • LUA_GCISPAUSED for lua_gc - determine if GC is running, but in a paused state at the moment
    • lua_memorydump - dump heap state to a json file for use with Luau tools
    • lua_setpointerencodekey - setup keys for lua_encodepointer which was not possible with public API despite lua_encodepointer being public
    • lua_callhook - official Luau way to enter the debug hook mode when debugging outside of a debug hook callback
    • lua_hascustomexecution and lua_incustomexecution - determine information about a call frame related to NCG or other custom execution plugin

Require

Analysis

  • Changed Frontend so that when the source of a module is missing, we clear all information about the dead source module.
  • Fixed a bug around order dependent intersections of table types:
local tbl = {}

function tbl:hmm(mode)
    -- `self.module` ends up having multiple refinements against
    -- ~(false?), which we were failing to correctly normalize.
    if self.module and self.module:GetMode() == mode then
    end

    if self.module then
        local _ = self.module:GetMode()
        error("uhoh", self.module:GetMode())
    end
end
  • Fixed one case where we would claim a table type and an extern type had an empty intersection:
type BIG_FRAME = {something: Frame} & Frame
type context<O> = {_object: O}
local big_context: context<BIG_FRAME>
local function fn<O>(p: context<O>)
end

-- Prior this failed to type check as we'd claim there's a generic bound mismatch,
-- due to an underlying uninhabited type.
fn(big_context)

Runtime

  • Introduce new APIs for integrating embedder defined objects into how Luau traces the heap for garbage collection.
  • lua_unref now unconditionally returns LUA_NOREF, similar to lua_weakunref.
  • Always attempt to inline immediately invoked lambdas
function test(x)
    local a, b, c = x + 1, x + 2, x + 3
    -- We will always attempt to inline this lambda, even though
    -- it is normally "too costly" to inline.
    local r = (function()
        for i in 0, a do
            for j in 0, b do
                if i + j >= c then return 42 end
            end
        end
        return 67
    end)()
    return r + 5
end
  • Fixed an instance where the error reported for a stack overflow on a synchronous versus asynchronous path was different.

Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Annie Tang annietang@roblox.com
Co-authored-by: Hunter Goldstein hgoldstein@roblox.com
Co-authored-by: Thomas Schollenberger tschollenberger@roblox.com
Co-authored-by: Varun Saini vsaini@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

Full Changelog: 0.730...0.731