Skip to content

Releases: luau-lang/luau

0.575

05 May 22:50
0014905
Compare
Choose a tag to compare

What's Changed

  • Improve the type for os.date using overloads by @JohnnyMorganz in #874
  • Fix grammar issues by @JohnnyMorganz in #915
  • Luau.Analyze.CLI now has experimental support for concurrent type checking. Use the option -jN where N is the number of threads to spawn.
  • Improve typechecking performance by ~17% by making the function Luau::follow much more efficient.

Full Changelog: 0.574...0.575

New solver

  • Improve the reliability of function overload resolution
  • More work toward supporting parallel type checking
  • Fix a bug in inference of == and ~= which would erroneously infer that the operands were boolean
  • Better error reporting when for...in loops are used incorrectly.

JIT

  • Fix unwind registration when libunwind is used on Linux
  • Fixed replaced IR instruction use count
  • Convert X64 unwind info generation to standard prologue
  • Implement A64 unwind info support for Dwarf2
  • Live in/out data for linear blocks is now created
  • Add side-exit VM register requirements to the IR dump
  • Reuse ConstPropState between block chains
  • Remove redundant base update

0.574

28 Apr 20:03
4b267aa
Compare
Choose a tag to compare

API Changes

  • With work started on read-only and write-only properties, Property::type member variable has been replaced with TypeId type() and setType(TypeId) functions.
  • New LazyType unwrap callback now has a void return type, all that's required from the callback is to write into unwrapped field.

Other Changes

New type solver

  • Work has started to support read-only (#77) and write-only (#79) properties
  • Refinements are no longer applied on l-values, removing some false-positive errors
  • Improved overload resolution against expected result type
  • Frontend::prepareModuleScope now works in the new solver
  • Cofinite strings are now comparable

JIT

  • Fixed MIN_NUM and MAX_NUM constant fold when one of the arguments is NaN
  • Added constant folding for number conversions and bit operations
  • Value spilling and rematerialization is now supported on arm64
  • Improved FASTCALL2K IR generation to support second argument constant
  • Added value numbering and load/store propagation optimizations
  • Added STORE_VECTOR on arm64, completing the IR lowering on this target

0.573

21 Apr 22:50
fe7621e
Compare
Choose a tag to compare

Analysis

  • Work toward affording parallel type checking
    • The interface to LazyType has changed: LazyType now takes a second callback that is passed the LazyType& itself. This new callback is responsible for populating the field TypeId LazyType::unwrapped. Multithreaded implementations should acquire a lock in this callback.
    • Modules now retain their humanReadableNames. This reduces the number of cases where type checking has to call back to a ModuleResolver.
  • Add prefix and name location to AstTypeReference by @JohnnyMorganz in #902
  • Add timing info to the Luau REPL compilation output

New type solver

  • Thread ICEs (Internal Compiler Errors) back to the Frontend properly
  • Refinements are no longer applied to lvalues
  • More miscellaneous stability improvements

JIT

  • Implement register spilling/restore for A64
  • Correct Luau IR value restore location tracking
  • Fixed use-after-free in x86 register allocator spill restore
  • Use btz for bit tests
  • Finish branch assembly support for A64
  • Codesize and performance improvements for A64
  • The bit32 library has been implemented for arm and x64

0.572

14 Apr 18:23
d141a5c
Compare
Choose a tag to compare

Analysis Changes

  • Fixed exported types not being suggested in autocomplete
  • T... is now convertible to ...any #767
  • Fixed issue with T? not being convertible to T | T or T? (sometimes when internal pointer identity is different)
  • Fixed potential crash in missing table key error suggestion to use a similar existing key

API changes

  • Add lua_getuserdatadtor by @petrihakkinen in #870
  • lua_topointer now returns a pointer for strings

For extra notes about internal development, you can read #899

0.571

07 Apr 21:56
ba67fb2
Compare
Choose a tag to compare

What's Changed

  • table.sort was improved further. It now guarentees N*log(N) time complexity in the worst case.
  • Fix #880

Full Changelog: 0.570...0.571

0.570

31 Mar 18:49
1212fda
Compare
Choose a tag to compare

What's Changed

0.569

24 Mar 18:07
b4ebad4
Compare
Choose a tag to compare

0.568

17 Mar 21:23
42a2805
Compare
Choose a tag to compare

Analysis Changes

  • A small subset of control-flow refinements have been added to recognize type options that are unreachable after a conditional/unconditional code block. (Fixes #356).

Some examples:

local function f(x: string?)
    if not x then return end

    -- x is 'string' here
end

Throwing calls like error or assert(false) instead of 'return' are also recognized.
Existing complex refinements like type/typeof and tagged union checks are expected to work, among others.

To enable this feature, LuauTinyControlFlowAnalysis exclusion has to be removed from ExperimentalFlags.h.
If will become enabled unconditionally in the future.

  • Linter has been integrated into the typechecker analysis so that type-aware lint warnings can work in any mode
    Frontend::lint methods were deprecated, Frontend::check has to be used instead with runLintChecks option set.
    Resulting lint warning are located inside CheckResult.

  • Part of Type error suppression RFC was implemented making subtyping checks with any type transitive.

Runtime Changes

  • Fixed large performance drop and increased memory consumption when array is filled at an offset (Fixes #590)

For extra notes about internal development, you can read #865

0.567

10 Mar 20:37
1fa8311
Compare
Choose a tag to compare

What's Changed

  • Fixed lerp() duplicate when compiling for C++20 by @niansa in #851
  • Fixed LUAU_ASSERT failure in luaG_getline if called from lua_Alloc #850
  • Recover AST of a declarations file #817
  • Optimize math.floor/ceil/round with SSE4.1
    • Results in a ~7-9% speedup on the math-cordic benchmark.
  • Optimized table.sort.
    • table.sort is now ~4.1x faster (when not using a predicate) and ~2.1x faster when using a simple predicate. Performance may improve further in the future.
  • Reorganize the memory ownership of builtin type definitions.
    • This is a small initial step toward affording parallel typechecking.

New Contributors

Full Changelog: 0.566...0.567

0.566

03 Mar 20:38
140e5a1
Compare
Choose a tag to compare

Analysis Changes

Runtime Changes

  • With -O2 optimization level, we now optimize builtin calls based on known argument/return count.
    Note that this change can be observable if getfenv/setfenv is used to substitute a builtin, especially if arity is different.
    Fastcall heavy tests show a 1-2% improvement.

Other changes

  • Fixed incorrect lexeme generated for string parts in the middle of an interpolated string (Fixes #744)
  • Luau can now be built with clang-cl (Fixes #736)
  • Fixed performance of autocomplete requests when suggestions have large intersection types (Solves https://github.com/Roblox/luau/discussions/847)

For extra notes about internal development, you can read #853