Immutable
release. Only release title and notes can be modified.
General
- Introduced
DenseHash2; this is based on LLVM's recent improvements to their own dense hash table implementation, detailed in this blog post. We hope for this to entirely replaceDenseHashas, for our workloads, it is as-good or better thanDenseHash, supports erasing elements, and does not require elements to be default constructible, meaning some uses ofstd::unordered_mapcan now beDenseHashMap. - Document luau-compile -t flag in the help message by @ssobkowski in #2455
- fix: add missing
AstExprConstantIntegervisitor toAstJsonEncoderby @spxnso in #2442
Parser
- Parser: reject duplicated binary prefixes by @bytexenon in #2461
Analysis
- Fixed inference of higher order generic functions when, themselves, used with generic functions:
local function identity<T>(t: T)
return t
end
-- Prior, `result` is of type `T?` and we error on `42` claiming its not of type `T`.
-- Now there are no errors and `result` is of type `number?`
local ok, result = pcall(identity, 42)- Fixed a class of internal compiler errors that could occur when nesting type-state-ing functions:
local tbl = {}
-- In some cases we would throw an exception like "CG: AstExprLocal came before its declaration?"
setmetatable(tbl, setmetatable(tbl, {}))- Indexing into refinements against
anyshould now preserve the any-ness of the original value:
-- Prior the first two return statements would raise a type
-- checking error, as we'd claim they were `~nil`, dropping
-- the `*error-type*` part.
local function keyExtractor(item: any, index: number): string
if typeof(item) == "table" and item.key ~= nil then
return item.key
end
if typeof(item) == "table" and item.id ~= nil then
return item.id
end
return tostring(index)
end- Fix
@deprecatedattribute not propagating on anonymous functions in new solver by @JohnnyMorganz in #2332 - Track the local binding that a prefixed type reference is linked to by @JohnnyMorganz in #2334
- Add a
luaL_checkudatataggedandlua_getuserdatanameby @PhoenixWhitefire in #2483 __tostringfortypeby @PhoenixWhitefire in #2525- Correct
types.singletonusinglua_typenameinstead ofluaL_typenameby @PhoenixWhitefire in #2506
Runtime
- Fixed a garbage collection issue with
lua_registeruserdatadirectfieldget, where depending on the GC phase, we may erroneously consider an allocated dispatch table to be unreachable. - NCG: When replacing an instruction, we now more consistently attempt to substitute it with a precomputed value. E.g., if we replace an IR instruction with one that has already been computed, we can potentially emit a
STORErather than said instruction and an additionalSTORE.
New Contributors
- @spxnso made their first contribution in #2442
- @ssobkowski made their first contribution in #2455
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: Ilya Rezvov irezvov@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.728...0.729