Skip to content

Releases: luau-lang/luau

0.622

19 Apr 21:53
68bd1b2
Compare
Choose a tag to compare

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 to luaM_getnextpage (generally removing gco 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 replace SingletonOrTopTypeConstraint 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 on TypeIds.
  • Changed type family reduction to correctly use a semantic notion of uninhabited types, rather than checking for never types specifically.
  • Refactor the union and intersect 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 to FunctionStats 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

12 Apr 17:49
9c21462
Compare
Choose a tag to compare

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 into add<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

05 Apr 20:59
67e16cb
Compare
Choose a tag to compare

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 as local 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

30 Mar 23:18
47ad768
Compare
Choose a tag to compare

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]

0.618

22 Mar 17:55
c1830d8
Compare
Choose a tag to compare

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 [email protected]
Co-authored-by: Lily Brown [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

Full Changelog: 0.617...0.618

0.617

15 Mar 23:47
d21b6fd
Compare
Choose a tag to compare

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 [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Aviral Goel [email protected]
Co-authored-by: David Cope [email protected]
Co-authored-by: Lily Brown [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

0.616

09 Mar 00:52
ae459a0
Compare
Choose a tag to compare

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 [email protected]
Co-authored-by: Alexander McCord [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: David Cope [email protected]
Co-authored-by: Lily Brown [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

0.615

01 Mar 18:58
443903a
Compare
Choose a tag to compare

What's changed?

  • Luau allocation scheme was changed to handle allocations in 513-1024 byte range internally without falling back to global allocator
    • coroutine/thread creation no longer requires any global allocations, making it up to 15% faster (vs libc malloc)
    • table construction for 17-32 keys or 33-64 array elements is up to 30% faster (vs libc malloc)
  • luau-compile: Fix usage of vector-ctor without vector-lib by @zeux in #1172

New Type Solver

  • Cyclic unary negation type families are reduced to number when possible
  • Class types are skipped when searching for free types in unifier to improve performance
  • Fixed issues with table type inference when metatables are present
  • Improved inference of iteration loop types
  • Fixed an issue with bidirectional inference of method calls
  • Type simplification will now preserve error suppression markers

Native Code Generation

  • Fixed TAG_VECTOR skip optimization to not break instruction use counts (broken optimization wasn't included in 614)
  • Fixed missing side-effect when optimizing generic loop preparation instruction
  • Optimized vector ops for X64 when the source is computed by @zeux in #1174

Full Changelog: 0.614...0.615

0.614

23 Feb 20:36
3b0e93b
Compare
Choose a tag to compare

What's changed?

Add program argument passing to scripts run using the Luau REPL! You can now pass --program-args (or shorthand -a) to the REPL which will treat all remaining arguments as arguments to pass to executed scripts. These values can be accessed through variadic argument expansion.

Native Code Generation

  • Improve A64 lowering for vector operations by using vector instructions
  • Resolve a developer reported divergence in VM and NCG code by fixing lowering issues in IR value location tracking!

New Type Solver

  • Apply substitution to type families, and emit new constraints to reduce those further
  • More progress on reducing comparison (lt/le) type families
  • Resolve two major sources of cyclic types in the new solver
  • Turned internal compiler errors (ICEs) in the new subtyping algorithm into errors

Full Changelog: 0.613...0.614

0.613

16 Feb 02:11
ea14e65
Compare
Choose a tag to compare

What's changed?

  • Compiler now targets bytecode version 5 by default, this includes support for vector type literals and sub/div opcodes with a constant on lhs

New Type Solver

  • Normalizer type inhabitance check has been optimized
  • Added ability to reduce cyclic and/or type families

Native Code Generation

  • CodeGen::compile now returns more specific causes of a code generation failure
  • Fixed linking issues on platforms that don't support unwind frame data registration

Full Changelog: 0.612...0.613