Skip to content

Releases: luau-lang/luau

0.601

27 Oct 21:26
e5ec0cd
Compare
Choose a tag to compare

What's changed

  • bit32.byteswap added by @Dekkonot (RFC)
  • Buffer library implementation (RFC)
  • Fixed a missing stdint.h include by @xgqt
  • Fixed parser limiter for recursive type annotations being kind of weird (fixes #645)

Native Codegen

  • Fixed a pair of issues when lowering bit32.extract
  • Fixed a narrow edge case that could result in an infinite loop without an interruption
  • Fixed a negative array out-of-bounds access issue
  • Temporarily reverted linear block predecessor value propagation

New type solver

  • We now type check assignments to annotated variables
  • Fixed some test cases under local type inference
  • Moved isPending checks for type families to improve performance
  • Optimized our process for testing if a free type is sufficiently solved

0.600

21 Oct 04:25
fd6250c
Compare
Choose a tag to compare

Analysis

  • Improve readability of unions and intersections by limiting the number of elements of those types that can be presented on a single line

Runtime

  • if...then...else expressions are now optimized into AND/OR form when possible.
  • Add a new buffer type to Luau based on the buffer RFC and additional C API functions to work with it; this release does not include the library.
  • C API to work with string buffers has been updated to align with Lua version more closely

Native Codegen

  • Simplified the way numerical loop condition is translated to IR

New Type Solver

  • Operator inference is now handled by type families
  • Created a new system called Type Paths to explain why subtyping tests fail in order to improve the quality of error messages.
  • Progress towards implementing Data Flow analysis in the new solver

0.599

13 Oct 20:30
24fdac4
Compare
Choose a tag to compare

What's Changed

  • Improve POSIX compliance in CLI/FileUtils.cpp by @SamuraiCrow #1064
  • AstStat*::hasEnd is deprecated; use AstStatBlock::hasEnd instead
  • Added a lint for common misuses of the # operator
  • Linter now issues deprecated diagnostics for some uses of getfenv and setfenv
  • Fixed a case where we included a trailing space in some error stringifications

Compiler

  • Do not do function analysis in -O2 on self functions to make compilation faster
  • Improve detection of invalid repeat..until expressions vs continue #1065

New Type Solver

  • We now cache subtype test results to improve performance
  • Improved operator inference mechanics (aka type families)
  • Further work towards type states
  • Work towards new non-strict mode continues

Native Codegen

  • Instruction last use locations should follow the order in which blocks are lowered

New Contributors

Full Changelog: 0.598...0.599

0.598

06 Oct 19:40
36e0e64
Compare
Choose a tag to compare

What's Changed

  • Include windows.h instead of Windows.h by @RadiantUwU in #1055
  • Custom implementation of os.time for all platforms

Compiler

  • Fix repeat..until loops with continue statement when until expression refers to constants #1042
  • Fix repeat..until loops with continue statement when upvalues are used #1043
  • Disable builtin constant folding at -O2 when getfenv/setfenv are used
  • Bytecode version produced by the compiler has been upgraded to 4 (runtime support for v4 starts from 0.588).

New Type Checker

  • Initial work toward type states.
  • Rework most overloadable operators to use type families.
  • Initial work toward our new nonstrict mode.

Native Codegen

  • Fix native code generation for dead loops
  • Annotate top-level functions as cold to avoid compiling them to native code
  • Slightly smaller/faster X64 calls to Luau functions
  • Slightly smaller/faster A64 calls for both Luau and C functions
  • Inline constant array index offset into the load/store instruction
  • Increase X64 spill slots from 5 to 13

New Contributors

  • @RadiantUwU made their first contribution in #1055

Full Changelog: 0.597...0.598

0.597

30 Sep 01:20
1d0b449
Compare
Choose a tag to compare

New Type Solver

  • Implement bidirectional type inference for higher order functions so that we can provide a more precise type improving the autocomplete's human factors.
  • We seal all tables, so we changed the stringification to make it a little lighter on users.
  • Fixed a case of array-out-of-bound access.
  • Type families no longer depends on TxnLog and Unifier.
  • Type refinements now waits until the free types are sufficiently solved.

Native Code Generation

  • Remove cached slot lookup for executeSETTABLEKS function because it is a fallback in the event of a cache miss, making the cached slot lookup redundant.
  • Optimized repeated array lookups, e.g. a[3] in a[3] = a[3] / 2 is done once.

Misc

  • On some platforms, it is necessary to use gmtime_s with the arguments reversed to get the current time. You can now define DOCTEST_CONFIG_USE_GMTIME_S to build and run unit tests on those platforms.

Full Changelog: 0.596...0.597

0.596

22 Sep 19:26
16fbfe9
Compare
Choose a tag to compare

What's Changed

  • Support Control Flow type Refinements for "break" and "continue" statements by @AmberGraceSoftware in #1004
  • The old type unification engine will now report a more fine-grained error at times, indicating that type normalization in particular failed

New Type Solver

  • Refactor of Unifier2, the new unification implementation for Luau
  • Completed MVP of new unification implementation
  • Dramatically simplified overload selection logic
  • Type family reduction can now apply sooner to free types that have been solved
  • Subtyping now supports table indexers
  • Generalization now replaces bad generics with unknown

Native Code Generation

  • Reduce stack spills caused by FINDUPVAL and STORE_TAG
  • Generate SHL/SHR/SAR/rotates with immediate operands in X64
  • Removed redundant case re-check in table lookup fallback

New Contributors

Full Changelog: 0.595...0.596

0.595

15 Sep 17:33
31a017c
Compare
Choose a tag to compare

What's new

  • Rerun clang-format on the code
  • Fix the variance on indexer result subtyping. This fixes some issues with inconsistent error reporting.
  • Fix a bug in the normalization logic for intersections of strings
  • Demo site: case sensitive highlighting by @Someon1e in #1040

New Type Solver

  • New overload selection logic
  • Subtype tests now correctly treat a generic as its upper bound within that generic's scope
  • Semantic subtyping for negation types
  • Semantic subtyping between strings and compatible table types like {lower: (string) -> string}
  • Further work toward finalizing our new subtype test
  • Correctly generalize module-scope symbols

Native Codegen

  • Lowering statistics for assembly
  • Make executable allocation size/limit configurable without a rebuild. Use FInt::LuauCodeGenBlockSize and FInt::LuauCodeGenMaxTotalSize.

New Contributors

Full Changelog: 0.594...0.595

0.594

08 Sep 00:25
c7c986b
Compare
Choose a tag to compare

Analysis Changes

  • Fixed generic variadic function unification succeeding when it should have reported an error

Other Changes

  • Fixed Frontend::markDirty not working on modules that were not typechecked yet
  • Fix build & test conformance issues on mingw32/gcc and mingw64/clang by @jdpatdiscord in #1023
  • Update syntax.md by @zeux in #1035

New Type Solver

  • Implemented semantic subtyping check for function types

Native Code Generation

  • Improved performance of numerical loops with a constant step
  • Simplified IR for bit32.extract calls extracting first/last bits
  • Improved performance of NaN checks

0.593

01 Sep 18:10
551a43c
Compare
Choose a tag to compare

Floor division operator //

Luau now supports floor division operator //; by default it works on numbers and is equivalent to math.floor(a / b), but it can also be overridden for other types using __idiv metamethod. The operator has the same syntax and semantics as // in Lua 5.3; see #832 for full RFC.

Analysis Changes

  • Autocomplete now shows end within do blocks
  • Restore BraceType when using Lexer::lookahead (fixes #1019)

New Type Solver

  • Enhance subtyping tests to support metatables, string singletons, and class types

Native Codegen

  • Fixed clobbering of non-volatile xmm registers on Windows
  • Optimize redundant table slot lookups
  • Improve value propagation optimizations to work across basic blocks in some cases
  • Implemented IR translation of table.insert builtin
  • Fixed mmap error handling on macOS/Linux

0.592

25 Aug 17:34
ce9414c
Compare
Choose a tag to compare

Analysis Changes

  • Improved parsing error messages
  • Fixed crash on null pointer access in unification (fixes #1017)

Other Changes

  • AST queries at position where function name is will now return AstExprLocal
  • Lexer performance has been slightly improved
  • Fixed incorrect string singleton autocomplete suggestions (fixes #858)
  • Native code support is enabled by default and native=1 (make)/LUAU_NATIVE (CMake)/-DLUA_CUSTOM_EXECUTION configuration is no longer required

New Type Solver

  • New subtyping check can now handle generic functions and tables (including those that contain cycles)

Native Codegen

  • Loops with non-numeric parameters are now handled by VM to streamline native code
  • Array size check can be optimized away in SETLIST
  • On failure, CodeGen::compile returns a reason
  • Fixed clobbering of non-volatile xmm registers on Windows