Skip to content

Releases: luau-lang/luau

0.528

20 May 00:09
f5923ae
Compare
Choose a tag to compare

Analysis changes

  • Fix type checker assertions on some valid code
  • Type checker now correctly applies the expected shape of a table literal in certain cases (fixes #483)
  • Fix certain cases of generic types leaking to outside scopes (fixes #484)
  • Fix type checking of generic functions in certain cases when not all function arguments/returns were annotated

Runtime changes

  • Bytecode optimizer can now inline functions and unroll loops with nested closures at -O2
  • Improve bytecode optimizations for code that returns a type-cast local (return a :: type)

Community contributions

0.527

13 May 19:42
a36b1eb
Compare
Choose a tag to compare

Analysis changes

  • Type checker now allows comparing different types to each other in strict mode as long as the types have some values in common

Runtime changes

  • Returning multiple local variables is now more efficient as long as they land in consecutive registers
  • Bytecode compilation is now ~1% faster

CLI changes

  • Increase stack size in Debug builds on MSVC (fixes #417)
  • Fix gcc11 build warning

Community contributions

None this week; PRs are always welcome!

0.526

06 May 00:11
72d8d44
Compare
Choose a tag to compare

Analysis changes

  • Make type checker more robust for large and complex type graphs

Runtime changes

  • Implement local function inlining when -O2 is used
  • Implement support for generalized iteration (syntax)
  • Fix a rare case when table.unpack(8000) didn't raise a stack limit error

Community contributions

  • Fix non-C locale issues in REPL by @byte-chan in #474
  • Fix feed link in footer by @phoebethewitch in #476

0.525

29 Apr 07:21
bd6d44f
Compare
Choose a tag to compare

Analysis changes

  • Type checker stability improvements

Runtime changes

  • Fix loop unrolling for cases when the loop variable is modified inside the loop
  • Tag-based destructors set via lua_setuserdatadtor now get state pointer as an extra argument

Community contributions

None this week; PRs are always welcome!

0.524

21 Apr 23:40
e0a6461
Compare
Choose a tag to compare

Analysis changes

  • Improve type mismatch errors for classes defined in different modules
  • Non-strict type inference now automatically infers function return types, similarly to strict mode
  • Improve output of luau-analyze --annotate for arrays and for loops
  • Fix GCC9 warnings in CMake builds

Runtime changes

  • Make bytecode compiler ~5% faster by reducing temporary allocations
  • When new optimization level 2 is used (-O2 in CLI), bytecode compiler now unrolls short for loops when it's profitable
  • Improve incremental GC pacing to make GC workload more even
  • Reduce the pace of sweeping during GC (this can make GC cycles a bit longer but reduces the frame time impact of GC in sweep stage)

Community contributions

None this week; PRs are always welcome!

0.523

15 Apr 00:07
8e78450
Compare
Choose a tag to compare

Analysis changes

  • Type checker now normalizes types which results in cleaner error output
  • Type checking in strict mode will now infer union for return types by combining types from multiple return statements
  • Type checker is now ~10% faster as a result of a series of optimizations
  • Type checker now emits a regular type error instead of an internal error for some deeply nested types

Runtime changes

  • Fix undefined behavior (unguarded double->int cast) in bytecode compiler
  • Implement bytecode cost model for future compiler optimizations
  • Fix a bug in the new boundary invariant that could lead to crashes during table literal evaluation

Community contributions

None this week; PRs are always welcome!

0.522

07 Apr 21:49
de1381e
Compare
Choose a tag to compare

Analysis changes

  • Improve type checking stability for programs with module cycles in case when modules are being changed and rechecked in an IDE
  • Fix type checking of array literals when the type is supposed to be a dictionary (#423)
  • Improve syntax error message when ... is used after a type unexpectedly

Runtime changes

  • Improve branch optimizations when the branch condition is X and Y or X or Y where X is known at compile time

Community contributions

None this week; PRs are always welcome!

0.521

31 Mar 21:14
Compare
Choose a tag to compare

Analysis changes

  • Fix type checking of function definitions that define a table field that was declared via a type annotation
  • Fix AST line/column information for type aliases followed by a comment

Runtime changes

  • luau_load now requires the bytecode version 2 (enabled since 0.509); old bytecode blobs need to be recompiled from source
  • Tables now maintain a new boundary invariant: when #t != 0, element #t is located inside the array part of the table. This results in a more consistent iteration order with pairs, and allows for better optimizations in various parts of the runtime in the future. As part of this, computing #t is now worst-case O(logn), amortized O(1).

Community contributions

None this week; PRs are always welcome!

0.520

24 Mar 22:40
2c339d5
Compare
Choose a tag to compare

Analysis changes

  • Improve type errors when types from different modules have the same name
  • Improve type errors for argument count mismatch when the function is variadic
  • Improve type error explanation for table indexer type mismatches
  • Remove legacy Roblox-specific warnings from UnknownType lint
  • Significantly improve type checking performance for programs that have type errors with complex types

Runtime changes

  • Slightly reduce the GC overhead by excluding metrics collection by default
  • Significantly improve pcall/resume performance on macOS when LUA_USE_LONGJMP is used (#425)

Community contributions

None this week; PRs are always welcome!

0.519

18 Mar 00:53
362428f
Compare
Choose a tag to compare

Analysis changes

  • Fix pointer identity issues with declared global types (fixes #409)
  • Improve autocomplete for self calls (via :)
  • Fix type checking of function definitions when extending a table with string indexer
  • Fix some cases when any type wasn't treated as optional by the type checker
  • Fix some interactions with discriminable unions during type checking
  • Improve type checking stability

Runtime changes

  • Add C API to access memory category information (lua_setmemcat and lua_totalbytes) for memory profiling
  • Fix typeof() semantics for untagged host-exposed user data: now typeof() returns __type metafield for all host-exposed userdata (but not userdata created via newproxy())
  • Fix definition of lua_clonefunction when LUA_API was customized in the build process (fixes #411)
  • Fix 32-bit Windows builds when using clang-cl (fixes #421)
  • Optimize table rehashing (~15% faster dictionary table resize on average)

Community contributions