Skip to content

0.727

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Jun 19:06
Immutable release. Only release title and notes can be modified.
f1f121d

Release 727 Notes

JIT Inliner

This release introduces JIT Bytecode-to-Bytecode inliner library. To activate it Luau::JitInliner::setup should be called on lua_State. To use it in conformance tests or luau CLI --jit-inliner flag should be passed.

GC

  • fixed incorrect reporting of visited bytes for tables

CodeGen

  • DSE hints should only be provided for full tag+value kills

Typing

  • Variadic type annotations are now "pushed" into arguments
local foo: { read bar: (...string) -> () } = {
    -- Prior, `foobar` would be of type `unknown`, but the clear intent is for `foobar` to be
    -- of type `string`.
    bar = function (foobar)
        print(foobar)
    end
}
  • Disallow extern class declaration syntax
  • When subtype testing a type like nil <: T?, don't bind the generic.
local function createElement<P>(component: (P) -> any, props: P?): any
    return nil
end

local function MyComponent(props: { x: number, y: number? })
    return nil
end

-- Prior, when inferring the instantiation of `createElement`, we'd end up
-- collecting a bound of `nil` for `P` due to an interaction between generic
-- inference and width subtyping, which ended up in incoherent bounds for
-- `P`, ultimately preventing us from type checking it.
createElement(MyComponent, { x = 1 })
```l
- Disable bidirectional function inference of return types if the function is ambiguous
```luau
local function useEffect(callback: (() -> ()) | (() -> () -> ()), deps: {any}?): ()
end

-- Both `() -> ()` and `() -> () -> ()` are valid options to push into this first lambda,
-- but without inferring the _inner_ lambda we do not know that we need to push the
-- second, so we opt to _not_ push the return type in at all.
useEffect(function()
    return function()
    end
end)

Misc

  • Makes Luau::Set pick the null tombstone by default when the key is a pointer type
  • Make DenseHashMap/Set optionally default initializable when the key is a pointer type

Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Hunter Goldstein hgoldstein@roblox.com
Co-authored-by: Ilya Rezvov irezvov@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Sora Kanosue skanosue@roblox.com
Co-authored-by: Thomas Schollenberger tschollenberger@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com