Skip to content

Releases: luau-lang/luau

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

0.612

09 Feb 18:01
d6c2472
Compare
Choose a tag to compare

What's changed?

New solver

  • Fix bugs where bidirectional type inference would fail to take effect
    at the proper stage.
  • Improve inference of mutually recursive functions
  • Fix crashes

Co-authored-by: Aaron Weiss [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

Full Changelog: 0.611...0.612

0.611

02 Feb 21:39
67ce75e
Compare
Choose a tag to compare

What's changed?

Native Code Generation

  • Fixed an UAF relating to reusing a hash key after a weak table has undergone some GC.
  • Fixed a bounds check on arm64 to allow access to the last byte of a buffer.

New Type Solver

  • Type states now preserves error-suppression, i.e. local x: any = 5 and x.foo does not error.
  • Made error-suppression logic in subtyping more accurate.
  • Subtyping now knows how to reduce type families.
  • Fixed function call overload resolution so that the return type resolves to the correct overload.
  • Fixed a case where we attempted to reduce irreducible type families a few too many times, leading to duplicate errors.
  • Type checker needs to type check annotations in function signatures to be able to report errors relating to those annotations.
  • Fixed an UAF from a pointer to stack-allocated data in Subtyping's explainReasonings.

Nonstrict Type Checker

  • Fixed a crash when calling a checked function of the form math.abs with an incorrect argument type.
  • Fixed a crash when calling a checked function with a number of arguments that did not exactly match the number of parameters required.

Internal Contributors

Co-authored-by: Aaron Weiss [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

0.610

27 Jan 03:25
9c588be
Compare
Choose a tag to compare

What's changed?

  • Check interrupt handler inside the pattern match engine to eliminate potential for programs to hang during string library function execution.
  • Allow iteration over table properties to pass the old type solver.

Native Code Generation

  • Use in-place memory operands for math library operations on x64.
  • Replace opaque bools with separate enum classes in IrDump to improve code maintainability.
  • Translate operations on inferred vectors to IR.
  • Enable support for debugging native-compiled functions in Roblox Studio.

New Type Solver

  • Rework type inference for boolean and string literals to introduce bounded free types (bounded below by the singleton type, and above by the primitive type) and reworked primitive type constraint to decide which is the appropriate type for the literal.
  • Introduce FunctionCheckConstraint to handle bidirectional typechecking for function calls, pushing the expected parameter types from the function onto the arguments.
  • Introduce union and intersect type families to compute deferred simplified unions and intersections to be employed by the constraint generation logic in the new solver.
  • Implement support for expanding the domain of local types in Unifier2.
  • Rework type inference for iteration variables bound by for in loops to use local types.
  • Change constraint blocking logic to use a set to prevent accidental re-blocking.
  • Add logic to detect missing return statements in functions.

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: Vyacheslav Egorov [email protected]

0.609

19 Jan 18:43
cdd1a38
Compare
Choose a tag to compare

What's Changed

New Type Solver

  • keyof and rawkeyof type operators have been updated to match final text of the RFC
  • Fixed issues with cyclic type families that were generated for mutable loop variables

Native Code Generation

  • Fixed inference for number / vector operation that caused an unnecessary VM assist

New Contributors

Full Changelog: 0.608...0.609

0.608

12 Jan 22:33
f31232d
Compare
Choose a tag to compare

Old Solver:


  • Fix a bug in the old solver where a user could use the keyword typeof as the name of a type alias.
  • Fix stringification of scientific notation to omit a trailing decimal place when not followed by a digit e.g. 1.e+20 -> 1e+20

New Solver

  • Continuing work on the New non-strict mode
  • Introduce keyof and rawkeyof type function for acquiring the type of all keys in a table or class (luau-lang/rfcs#16)

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

0.607

15 Dec 21:33
ff502f0
Compare
Choose a tag to compare

What's changed?

  • Fix up the std::iterator_traits definitions for some Luau data structures.
  • Replace some of the usages of std::unordered_set and std::unordered_map with Luau-provided data structures to increase performance and reduce overall number of heap allocations.
  • Update some of the documentation links in comments throughout the codebase to correctly point to the moved repository.
  • Expanded JSON encoder for AST to support singleton types.
  • Fixed a bug in luau-analyze where exceptions in the last module being checked during multithreaded analysis would not be rethrown.

New type solver

  • Introduce a refine type family to handle deferred refinements during type inference, replacing the old RefineConstraint.
  • Continued work on the implementation of type states, fixing some known bugs/blockers.
  • Added support for variadic functions in new non-strict mode, enabling broader support for builtins and the Roblox API.

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: Vyacheslav Egorov [email protected]

0.606

08 Dec 22:09
c26d820
Compare
Choose a tag to compare

New Solver

  • Improvements to data flow analysis

Native Code Generation

  • Block limit is now per-function instead of per-module

Full Changelog: 0.605...0.606