Skip to content

Releases: luau-lang/luau

0.583

07 Jul 20:21
e25de95
Compare
Choose a tag to compare

What's Changed

  • Fix indexing table intersections using x["prop"] syntax by @JohnnyMorganz in #971
  • Add console output codepage for windows by @imlodinu in #967
  • Added Frontend::parse for a fast source graph preparation
  • luau_load should check GC
  • Work toward a type-diff system for nicer error messages

New Type Solver

  • Correctly suppress errors in more cases
  • Further improvements to typechecking of function calls and return statements
  • Crash fixes
  • Propagate refinements drawn from the condition of a while loop into the loop body

JIT

  • Fix accidental bailout for math.frexp/modf/sign in A64
  • Work toward bringing type annotation info in
  • Do not propagate Luau IR constants of wrong type into load instructions
  • CHECK_SAFEENV exits to VM on failure
  • Implement error handling in A64 reg allocator
  • Inline the string.len builtin
  • Do not enter native code of a function if arguments don’t match

New Contributors

  • @imlodinu made their first contribution in #967

Full Changelog: 0.582...0.583

0.582

24 Jun 06:25
76bea81
Compare
Choose a tag to compare

What's Changed

  • Optimized operations like instantiation and module export for very large types

New Type Solver

  • Typechecking of function calls was rewritten to handle more cases correctly
  • Fixed a crash that can happen after self-referential type is exported from a module
  • Fixed a false positive error in string comparison
  • Added handling of for...in variable type annotations and fixed issues with the iterator call inside
  • Self-referential 'hasProp' and 'setProp' constraints are now handled correctly

JIT

  • Added '--target' argument to luau-compile to test multiple architectures different from host architecture
  • GC barrier tag check is skipped if type is already known to be GC-collectable
  • Added GET_TYPE/GET_TYPEOF instructions for type/typeof fast-calls
  • Improved code size of interrupt handlers on X64

0.581

16 Jun 17:45
d458d24
Compare
Choose a tag to compare

What's Changed

  • Build and use luau-compile in CI by @zeux in #952
  • Fix Arch Linux install instructions to use AUR by @RealEthanPlayzDev in #953
  • Add support for ClassType indexer in definition files by @JohnnyMorganz in #949
  • Remove --compile support from the REPL. You can just use luau-compile instead.
  • When an exception is thrown during parallel typechecking (usually an ICE), we now gracefully stop typechecking and drain active workers before rethrowing the exception.

New solver

  • Include more source location information when we hit an internal compiler error
  • Improve the logic that simplifies intersections of tables

JIT

  • Save testable type annotations to bytecode
  • Improve block placement for linearized blocks
  • Add support for lea reg, [rip+offset] for labels
  • Unify X64 and A64 codegen for RETURN
  • Outline interrupt handlers for X64
  • Remove global rArgN in favor of build.abi
  • Change A64 INTERRUPT lowering to match X64

New Contributors

Full Changelog: 0.580...0.581

0.580

09 Jun 19:27
3ecd3a8
Compare
Choose a tag to compare

What's Changed

  • Update lint.md to specify language on fenced code blocks which have none by @BenMactavsin in #946
  • Fix website demo's string highlighting behaviour by @BenMactavsin in #942
  • Update performance.md by @zeux in #948
  • Added luau-compile executable target to build/test compilation without having full REPL included.

New Type Solver

  • Fixed the order in which constraints are checked to get more deterministic errors in different environments
  • Fixed isNumber/isString checks to fix false positive errors in binary comparisons
  • CannotCallNonFunction error is reported when calling an intersection type of non-functions

JIT

  • Outlined X64 return instruction code to improve code size
  • Improved performance of return instruction on A64
  • Added construction of a dominator tree for future optimizations

0.579

02 Jun 19:57
63679f7
Compare
Choose a tag to compare

Analysis Changes

  • When type inference fails to find any matching overload for a function, we were declining to commit any changes to the type graph at all. This was resulting in confusing type errors in certain cases. Now, when a matching overload cannot be found, we always commit to the first overload we tried.

JIT

  • Fix missing variadic register invalidation in FALLBACK_GETVARARGS
  • Add a missing null pointer check for the result of luaT_gettm

0.578

25 May 22:01
271c509
Compare
Choose a tag to compare

Compiler Changes

  • Fixed inlining of functions when they are used to compute their own arguments

Other Changes

  • Fixed gcc warning about uninitialized std::optional

New Type Solver

  • Type families that are not part of a function signature cannot be resolved at instantiation time and will now produce an error. This will be relaxed in the future when we get constraint clauses on function signatures (internally)
  • never type is now comparable
  • Improved typechecking of for..in statements
  • Fixed checks for number type in Add type family
  • Performance was improved, with particularly large gains on large projects

JIT

  • We eliminated the call instruction overhead when native code support is enabled in the VM
  • Small optimizations to arm64 lowering
  • Reworked LOP_GETIMPORT handling to reduce assembly code size
  • Fixed non-deterministic binary output
  • Fixed bad code generation caused by incorrect SSA to VM register links invalidation

0.577

19 May 21:00
721f6e1
Compare
Choose a tag to compare

Analysis Changes

  • Fix a crash that could occur in the presence of a cyclic union. We shouldn't be creating cyclic unions, but we shouldn't be crashing when they arise either.
  • Minor cleanup of luau_precall
  • Internal change to make L->top handling slightly more uniform
  • Optimize SETGLOBAL & GETGLOBAL fallback C functions.
  • Enable compile-time user configuration for LUA_VECTOR_SIZE by @mundusnine in #929

New Type Solver

  • Switch to a greedier but more fallible algorithm for simplifying union and intersection types that are created as part of refinement calculation. This has much better and more predictable performance.
  • Fix a constraint cycle in recursive function calls.
  • Much improved inference of binary addition. Functions like function add(x, y) return x + y end can now be inferred without annotations. We also accurately typecheck calls to functions like this.
  • Many small bugfixes surrounding things like table indexers
  • Add support for indexers on class types. This was previously added to the old solver; we now add it to the new one for feature parity.

JIT

  • Add CodeGen C API by @khvzak in #931
  • Fuse key.value and key.tt loads for CEHCK_SLOT_MATCH in A64
  • Implement remaining aliases of BFM for A64
  • Implement new callinfo flag for A64
  • Add instruction simplification for int->num->int conversion chains
  • Don't even load execdata for X64 calls
  • Treat opcode fallbacks the same as manually written fallbacks

Other Changes

  • The syntax to the luau-reduce commandline tool has changed. It now accepts a script, a command to execute, and an error to search for. It no longer automatically passes the script to the command which makes it a lot more flexible. Also be warned that it edits the script it is passed in place. Do not point it at something that is not in source control!

New Contributors

Full Changelog: 0.576...0.577

0.576

12 May 18:30
97965c7
Compare
Choose a tag to compare

Analysis Changes

  • ClassType can now have an indexer defined on it. This allows custom types to be used in t[x] expressions.
  • Fixed how unification is performed for two optional types a? <: b?, previously it might have unified either 'a' or 'b' with 'nil'. Note that this fix is not enabled by default yet (see the list in ExperimentalFlags.h)

Other Changes

  • Add missing include for integer types by @Jan200101 in #925
  • Use correct globalScope in on demand type checker by @JohnnyMorganz in #923
  • Fixed search for closest executable breakpoint line. Previously, breakpoints might have been skipped in else blocks at the end of a function

New type solver

A concept of 'Type Families' has been introduced.
Type families can be thought of as type aliases with custom type inference/reduction logic included with them.
For example, we can have an Add<T, U> type family that will resolve the type that is the result of adding two values together.
This will help type inference to figure out what 'T' and 'U' might be when explicit type annotations are not provided.
In this update we don't define any type families, but they will be added in the near future.
It is also possible for Luau embedders to define their own type families in the global/environment scope.

Additional type solver changes:

  • Fixed scope used to find out which generic types should be included in the function generic type list
  • Fixed a crash after cyclic bound types were created during unification

JIT

  • Use of arm64 target on M1 now requires macOS 13
  • Entry into native code has been optimized. This is especially important for coroutine call/pcall performance as they involve going through a C call frame
  • LOP_LOADK(X) translation into IR has been improved to enable type tag/constant propagation
  • arm64 can use integer immediate values to synthesize floating-point values
  • x64 assembler removes duplicate 64bit numbers from the data section to save space
  • Linux perf can now be used to profile native Luau code (when running with --codegen-perf CLI argument)

New Contributors

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