Skip to content

Releases: luau-lang/luau

0.629

07 Jun 17:56
0fa6a51
Compare
Choose a tag to compare

What's Changed

  • Fix edge case in 'findBindingAtPosition' when looking up global binding at start of file by @JohnnyMorganz in #1254
  • implement leading bar and ampersand in types by @jackdotink in #1286
  • Fix incorrect comment in lgc.h by @zeux in #1288
  • tests: Adjust conformance tests to account for array invariant by @zeux in #1289
  • Implemented parsing logic for attributes
  • Added lua_setuserdatametatable and lua_getuserdatametatable C API methods for a faster userdata metatable fetch compared to luaL_getmetatable. Note that metatable reference has to still be pinned in memory!

New Solver

  • Further improvement to the assignment inference logic
  • Fix many bugs surrounding constraint dispatch order

Native Codegen

  • Add IR lowering hooks for custom host userdata types
  • Add IR to create new tagged userdata objects
  • Remove outdated NativeState

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Aviral Goel agoel@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

New Contributors

Full Changelog: 0.628...0.629

0.628

31 May 19:25
daf7932
Compare
Choose a tag to compare

What's new?

  • Remove a case of unsound table.move optimization
  • Add Luau stack slot reservations that were missing in REPL (fixes #1273)

New Type Solver

  • Assignments have been completely reworked to fix a case of cyclic constraint dependency
  • When indexing, if the fresh type's upper bound already contains a compatible indexer, do not add another upper bound
  • Distribute type arguments over all type families sans eq, keyof, rawkeyof, and other internal type families
  • Fix a case where buffers component weren't read in two places (fixes #1267)
  • Fix a case where things that constitutes a strong ref were slightly incorrect
  • Fix a case where constraint dependencies weren't setup wrt for ... in statement

Native Codegen

  • Fix an optimization that splits TValue store only when its value and its tag are compatible
  • Implement a system to plug additional type information for custom host userdata types

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

0.627

26 May 17:13
c8fe77c
Compare
Choose a tag to compare

What's new?

New Type Solver

  • Improved error messages for type families to describe what's wrong in more detail, and ideally without using the term type family at all.
  • Change boolean and string singletons in type checking to report errors to the user when they've gotten an impossible type (indicating a type error from their context).
  • Split debugging flags for type family reduction (DebugLuauLogTypeFamilies) from general solver logging (DebugLuauLogSolver).
  • Improve type simplification to support patterns like (number | string) | (string | number) becoming number | string.

Native Code Generation

  • Use templated luaV_doarith to speedup vector operation fallbacks.
  • Various small changes to better support arm64 on Windows.

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

0.626

16 May 23:41
fe0a819
Compare
Choose a tag to compare

What's changed?

New Type Solver

  • Fixed crash in numeric binary operation type families
  • Results of an indexing operation are now comparable to nil without a false positive error
  • Fixed a crash when a type that failed normalization was accessed
  • Iterating on a free value now implies that it is iterable

Full Changelog: 0.625...0.626

0.625

10 May 18:28
2a80f5e
Compare
Choose a tag to compare

What's changed?

  • Fix warning issued when Cmake version is too low (contributed by OSS community)

New Solver

  • Fix an issue with inhabitance testing of tables with cyclic properties
  • Preserve error suppression during type unification
  • Overhaul type reference counting in the constraint solver
  • Other miscellaneous constraint ordering fixes

Native Codegen

  • Fix incorrect assertion check in loadBytecodeTypeInfo

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

0.624

03 May 20:31
8a64cb8
Compare
Choose a tag to compare

What's Changed

  • CodeGen: Fix a typo in X64 (dis)assembler by @zeux in #1238
  • Optimize table.concat. This function is now 1.4x-2x faster. #1243
  • Optimize table.maxn. This function is now 5-14x faster
  • Add benchmarks for native compilation with type info enabled by @vegorov-rbx in #1244
  • Reserve Luau stack space for error message.

New Solver

  • Globals can be type-stated, but only if they are already in scope
  • Fix a stack overflow that could occur when normalizing certain kinds of recursive unions of intersections (of unions of intersections...)
  • Fix an assertion failure that would trigger when the __iter metamethod has a bad signature

Native Codegen

  • Type propagation and temporary register type hints
  • Direct vector property access should only happen for names of right length
  • BytecodeAnalysis will only predict that some of the vector value fields are numbers

Internal Contributors

Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Aviral Goel agoel@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
Full Changelog: 0.623...0.624

0.623

25 Apr 22:37
259e509
Compare
Choose a tag to compare

What's changed?

New Type Solver

  • Unification of two fresh types no longer binds them together.
  • Replaced uses of raw emplace with emplaceType to catch cyclic bound types when they are created.
  • SetIndexerConstraint is blocked until the indexer result type is not blocked.
  • Fix a case where a blocked type got past the constraint solver.
  • Searching for free types should no longer traverse into ClassTypes.
  • Fix a corner case that could result in the non-testable type ~{}.
  • Fix incorrect flagging when any was a parameter of some checked function in nonstrict type checker.
  • IterableConstraint now consider tables without __iter to be iterables.

Native Code Generation

  • Improve register type info lookup by program counter.
  • Generate type information for locals and upvalues

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

0.622

19 Apr 21:53
68bd1b2
Compare
Choose a tag to compare

What's changed?

  • Improved the actual message for the type errors for cannot call non-function when attempting to call a union of functions/callable tables. The error now correctly explains the issue is an inability to determine the return type of the call in this situation.
  • Resolve an issue where tables and metatables were not correctly being cloned during instantiation (fixes #1176).
  • Refactor luaM_getnextgcopage to luaM_getnextpage (generally removing gco prefix where appropriate).
  • Optimize table.move between tables for large ranges of elements.
  • Reformat a bunch of code automatically using clang-format.

New Type Solver

  • Clean up minimally-used or unused constraints in the constraint solver (InstantiationConstraint, SetOpConstraint, SingletonOrTopTypeConstraint).
  • Add a builtin singleton type family to replace SingletonOrTopTypeConstraint when inferring refinements.
  • Fixed a crash involving type path reasoning by recording when type family reduction has taken place in the path.
  • Improved constraint ordering by blocking on unreduced types families that are not yet proven uninhabitable.
  • Improved the handling of SetIndexerConstraints for both better inference quality and to resolve crashes.
  • Fix a crash when normalizing cyclic unions of intersections.
  • Fix a crash when normalizing an intersection with the negation of unknown.
  • Fix a number of crashes caused by missing follow calls on TypeIds.
  • Changed type family reduction to correctly use a semantic notion of uninhabited types, rather than checking for never types specifically.
  • Refactor the union and intersect type families to be variadic.

Native Code Generation

  • Improve translation for userdata key get/set and userdata/vector namecall.
  • Provide [top level] and [anonymous] as function names to FunctionStats as appropriate when no function name is available.
  • Disable unwind support on Android platforms since it is unsupported.

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Aviral Goel agoel@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

0.621

12 Apr 17:49
9c21462
Compare
Choose a tag to compare

What's changed?

  • Support for new 'require by string' RFC with relative paths and aliases in now enabled in Luau REPL application

New Type Solver

  • Fixed assertion failure on generic table keys ([expr] = value)
  • Fixed an issue with type substitution traversing into the substituted parts during type instantiation
  • Fixed crash in union simplification when that union contained uninhabited unions and other types inside
  • Union types in binary type families like add<a | b, c> are expanded into add<a, c> | add<b, c> to handle
  • Added handling for type family solving creating new type families
  • Fixed a bug with normalization operation caching types with unsolved parts
  • Tables with uninhabited properties are now simplified to never
  • Fixed failures found by fuzzer

Native Code Generation

  • Added support for shared code generation between multiple Luau VM instances
  • Fixed issue in load-store propagation and new tagged LOAD_TVALUE instructions
  • Fixed issues with partial register dead store elimination causing failures in GC assists

Full Changelog: 0.620...0.621

0.620

05 Apr 20:59
67e16cb
Compare
Choose a tag to compare

What's Changed

New Type Solver

  • Many more fixes to crashes, assertions, and hangs
  • Annotated locals now countermand the inferred types of locals, meaning that for a type type MyType = number | string, local foo : MyType = 5 behaves the same as local foo = 5 :: MyType, where before, foo would be assigned the type of the value on the rhs.
  • Type Normalization now respects resource limits.
  • Subtyping between classes and cyclic tables now supported

Native Code Generation

  • Work on the Native Code Generation(NCG) allocator continues

Internal Contributors

Co-authored-by: Aaron Weiss aaronweiss@roblox.com
Co-authored-by: Alexander McCord amccord@roblox.com
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: James McNellis jmcnellis@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com