Releases: luau-lang/luau
0.625
What's changed?
- Fix warning issued when Cmake version is too low (contributed by OSS community)
New Solver
- Fix an issue with inhabitance testing of tables with cyclic properties
- Preserve error suppression during type unification
- Overhaul type reference counting in the constraint solver
- Other miscellaneous constraint ordering fixes
Native Codegen
- Fix incorrect assertion check in loadBytecodeTypeInfo
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.624
What's Changed
- CodeGen: Fix a typo in X64 (dis)assembler by @zeux in #1238
- Optimize table.concat. This function is now 1.4x-2x faster. #1243
- Optimize table.maxn. This function is now 5-14x faster
- Add benchmarks for native compilation with type info enabled by @vegorov-rbx in #1244
- Reserve Luau stack space for error message.
New Solver
- Globals can be type-stated, but only if they are already in scope
- Fix a stack overflow that could occur when normalizing certain kinds of recursive unions of intersections (of unions of intersections...)
- Fix an assertion failure that would trigger when the __iter metamethod has a bad signature
Native Codegen
- Type propagation and temporary register type hints
- Direct vector property access should only happen for names of right length
- BytecodeAnalysis will only predict that some of the vector value fields are numbers
Internal Contributors
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Aviral Goel agoel@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
Full Changelog: 0.623...0.624
0.623
What's changed?
New Type Solver
- Unification of two fresh types no longer binds them together.
- Replaced uses of raw
emplace
withemplaceType
to catch cyclic bound types when they are created. SetIndexerConstraint
is blocked until the indexer result type is not blocked.- Fix a case where a blocked type got past the constraint solver.
- Searching for free types should no longer traverse into
ClassType
s. - Fix a corner case that could result in the non-testable type
~{}
. - Fix incorrect flagging when
any
was a parameter of some checked function in nonstrict type checker. IterableConstraint
now consider tables without__iter
to be iterables.
Native Code Generation
- Improve register type info lookup by program counter.
- Generate type information for locals and upvalues
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.622
What's changed?
- Improved the actual message for the type errors for
cannot call non-function
when attempting to call a union of functions/callable tables. The error now correctly explains the issue is an inability to determine the return type of the call in this situation. - Resolve an issue where tables and metatables were not correctly being cloned during instantiation (fixes #1176).
- Refactor
luaM_getnextgcopage
toluaM_getnextpage
(generally removinggco
prefix where appropriate). - Optimize
table.move
between tables for large ranges of elements. - Reformat a bunch of code automatically using
clang-format
.
New Type Solver
- Clean up minimally-used or unused constraints in the constraint solver (
InstantiationConstraint
,SetOpConstraint
,SingletonOrTopTypeConstraint
). - Add a builtin
singleton
type family to replaceSingletonOrTopTypeConstraint
when inferring refinements. - Fixed a crash involving type path reasoning by recording when type family reduction has taken place in the path.
- Improved constraint ordering by blocking on unreduced types families that are not yet proven uninhabitable.
- Improved the handling of
SetIndexerConstraints
for both better inference quality and to resolve crashes. - Fix a crash when normalizing cyclic unions of intersections.
- Fix a crash when normalizing an intersection with the negation of
unknown
. - Fix a number of crashes caused by missing
follow
calls onTypeId
s. - Changed type family reduction to correctly use a semantic notion of uninhabited types, rather than checking for
never
types specifically. - Refactor the
union
andintersect
type families to be variadic.
Native Code Generation
- Improve translation for userdata key get/set and userdata/vector namecall.
- Provide
[top level]
and[anonymous]
as function names toFunctionStats
as appropriate when no function name is available. - Disable unwind support on Android platforms since it is unsupported.
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Aviral Goel agoel@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.621
What's changed?
- Support for new 'require by string' RFC with relative paths and aliases in now enabled in Luau REPL application
New Type Solver
- Fixed assertion failure on generic table keys (
[expr] = value
) - Fixed an issue with type substitution traversing into the substituted parts during type instantiation
- Fixed crash in union simplification when that union contained uninhabited unions and other types inside
- Union types in binary type families like
add<a | b, c>
are expanded intoadd<a, c> | add<b, c>
to handle - Added handling for type family solving creating new type families
- Fixed a bug with normalization operation caching types with unsolved parts
- Tables with uninhabited properties are now simplified to
never
- Fixed failures found by fuzzer
Native Code Generation
- Added support for shared code generation between multiple Luau VM instances
- Fixed issue in load-store propagation and new tagged LOAD_TVALUE instructions
- Fixed issues with partial register dead store elimination causing failures in GC assists
Full Changelog: 0.620...0.621
0.620
What's Changed
New Type Solver
- Many more fixes to crashes, assertions, and hangs
- Annotated locals now countermand the inferred types of locals, meaning that for a type
type MyType = number | string
,local foo : MyType = 5
behaves the same aslocal foo = 5 :: MyType
, where before, foo would be assigned the type of the value on the rhs. - Type Normalization now respects resource limits.
- Subtyping between classes and cyclic tables now supported
Native Code Generation
- Work on the Native Code Generation(NCG) allocator continues
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.619
What's Changed
New Type Solver
- Many fixes to crashes, assertions, and hangs
- Binary type family aliases now have a default parameter
- Added a debug check for unsolved types escaping the constraint solver
- Overloaded functions are no longer inferred
- Unification creates additional subtyping constraints for blocked types
- Attempt to guess the result type for type families that are too large to resolve timely
Native Code Generation
- Fixed
IrCmd::CHECK_TRUTHY
lowering in a specific case - Detailed compilation errors are now supported
- More work on the new allocator
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Lily Brown lbrown@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.618
What's changed
Debugger
- Values after a 'continue' statement should not be accessible by debugger in the 'until' condition
New Type Solver
- Many fixes to crashes and hangs
- Better bidirectional inference of table literal expressions
Native Code Generation
- CodeGen: Preserve known tags for LOAD_TVALUE synthesized from LOADK (#1201)
- Initial steps toward a shared code allocator
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Lily Brown lbrown@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
Full Changelog: 0.617...0.618
0.617
What's Changed
- Fix a case where the stack wasn't completely cleaned up where
debug.info
errored when passed"f"
option and a thread. - Fix a case of uninitialized field in
luaF_newproto
.
New Type Solver
- When a local is captured in a function, don't add a new entry to the
DfgScope::bindings
if the capture occurs within a loop. - Fix a poor performance characteristic during unification by not trying to simplify an intersection.
- Fix a case of multiple constraints mutating the same blocked type causing incorrect inferences.
- Fix a case of assertion failure when overload resolution encounters a return typepack mismatch.
- When refining a property of the top
table
type, we no longer signal an unknown property error. - Fix a misuse of free types when trying to infer the type of a subscript expression.
- Fix a case of assertion failure when trying to resolve an overload from
never
.
Native Code Generation
- Fix dead store optimization issues caused by partial stores.
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Aviral Goel agoel@roblox.com
Co-authored-by: David Cope dcope@roblox.com
Co-authored-by: Lily Brown lbrown@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.616
What's Changed
- Add a compiler hint to improve Luau memory allocation inlining
New Type Solver
- Added a system for recommending explicit type annotations to users in cases where we've inferred complex generic types with type families.
- Marked string library functions as
@checked
for use in new non-strict mode. - Fixed a bug with new non-strict mode where we would incorrectly report arity mismatches when missing optional arguments.
- Implement an occurs check for unifications that would produce self-recursive types.
- Fix bug where overload resolution would fail when applied to non-overloaded functions.
- Fix bug that caused the subtyping to report an error whenever a generic was instantiated in an invariant context.
- Fix crash caused by
SetPropConstraint
not blocking properly. - Fix bug where type checker forgot the refined rvalue when mutating a property.
Native Code Generation
- Implement optimization to eliminate dead stores
- Optimize vector ops for X64 when the source is computed (thanks, @zeux!)
- Use more efficient lowering for UNM_* (thanks, @zeux!)
Internal Contributors
Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: David Cope dcope@roblox.com
Co-authored-by: Lily Brown lbrown@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com