Releases: luau-lang/luau
0.628
What's new?
- Remove a case of unsound
table.move
optimization - Add Luau stack slot reservations that were missing in REPL (fixes #1273)
New Type Solver
- Assignments have been completely reworked to fix a case of cyclic constraint dependency
- When indexing, if the fresh type's upper bound already contains a compatible indexer, do not add another upper bound
- Distribute type arguments over all type families sans
eq
,keyof
,rawkeyof
, and other internal type families - Fix a case where
buffers
component weren't read in two places (fixes #1267) - Fix a case where things that constitutes a strong ref were slightly incorrect
- Fix a case where constraint dependencies weren't setup wrt
for ... in
statement
Native Codegen
- Fix an optimization that splits TValue store only when its value and its tag are compatible
- Implement a system to plug additional type information for custom host userdata types
Internal Contributors
Co-authored-by: Aaron Weiss [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
Full Changelog: 0.627...0.628
0.627
What's new?
- Fix typo in a comment by @birds3345 in #1255
- add cmake folder to .gitignore by @birds3345 in #1246
New Type Solver
- Improved error messages for type families to describe what's wrong in more detail, and ideally without using the term
type family
at all. - Change
boolean
andstring
singletons in type checking to report errors to the user when they've gotten an impossible type (indicating a type error from their context). - Split debugging flags for type family reduction (
DebugLuauLogTypeFamilies
) from general solver logging (DebugLuauLogSolver
). - Improve type simplification to support patterns like
(number | string) | (string | number)
becomingnumber | string
.
Native Code Generation
- Use templated
luaV_doarith
to speedup vector operation fallbacks. - Various small changes to better support arm64 on Windows.
Internal Contributors
Co-authored-by: Aaron Weiss [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: James McNellis [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
Full Changelog: 0.626...0.627
0.626
What's changed?
New Type Solver
- Fixed crash in numeric binary operation type families
- Results of an indexing operation are now comparable to
nil
without a false positive error - Fixed a crash when a type that failed normalization was accessed
- Iterating on a free value now implies that it is iterable
Full Changelog: 0.625...0.626
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 [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
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 [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Aviral Goel [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
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 [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: James McNellis [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
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 [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Aviral Goel [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
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 [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: James McNellis [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]
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 [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: James McNellis [email protected]
Co-authored-by: Lily Brown [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]