These 24 commits are when the Protocol Buffers files have changed:
| Commit: | 91caa73 | |
|---|---|---|
| Author: | Annie Tang | |
| Committer: | GitHub | |
Sync to upstream/release/725 (#2443) Hi everyone! The Luau team has been flibbertigibbeting and recombobulating this week to bring another release to you! Check out what's new: ### Analysis * Fixes an error where Luau script analysis would sometimes incorrectly infer that `Library.table.unpack` returns `...unknown` * Writing a recursive generic type alias with the wrong number of generics now reports one more specific error rather than two. * Fixed a crash that could happen when normalizing an exceptionally large negated type. * Improved performance in constraint solving when reducing large nested type functions. * Fixed a crash that could happen when combining `export` and `class`. ### Compiler & Runtime * Luau C API will now auto-reserve required stack slots to reduce API errors, eliminating the need for manual stack management with `lua_checkstack` * Add support for yieldable protected C calls for custom Luau libraries via `luaL_pcallyieldable` * NCG: Remove the use of shared execution callback data for register spills * Updates the garbage collector to visit cached tagged userdata metatables, preventing premature collection and making the lua_setuserdatametatable API less error-prone. * Fixed two compiler crashes related to `export`. ----------------- As always, thanks to all our contributors, and happy pride and FIFA world cup!!! 🏳️🌈 ⚽️ 🏆 Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Thomas Schollenberger <tschollenberger@roblox.com> Co-authored-by: Varun Saini <vsaini@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> --------- Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Ilya Rezvov <irezvov@roblox.com>
| Commit: | 2e7f5d7 | |
|---|---|---|
| Author: | Annie Tang | |
Sync to upstream/release/725
| Commit: | 32d52d1 | |
|---|---|---|
| Author: | Hunter Goldstein | |
| Committer: | GitHub | |
Sync to upstream/release/722 (#2411) Hello! A somewhat small set of release notes for this week, but don't mistake it for being unexciting because ... ## Yielding iterators Luau now supports yielding within iterators! This affords code patterns such as being able to iterate over the results of an IO bound operation, e.g.: ```luau -- `net.serve` here could return a generator and the requisite initial state, -- and said generator can now yield to wait for IO! for request in net.serve(8080) do request.respondWith("Echo: " .. request.body) end ``` Note: yielding in metamethods is *still* unsupported, including `__iter`. Fixes https://github.com/luau-lang/luau/issues/838. ## Ast * Added concrete syntax tree support for expression groups and type groups ```luau -- In the CST, we will now preserve whitespace here ... local x = (1 + 2 ) -- ... and here ... type t = (number ) ``` ## Runtime * Introduced a new `CMPPROTO` bytecode instruction to be used with just-in-time bytecode inlining. * NCG: Fixed a bug where an optimization pass would cause us to treat a known `nil` value as potentially garbage collected. --- Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Ilya Rezvov <irezvov@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
| Commit: | 4791ae5 | |
|---|---|---|
| Author: | Hunter Goldstein | |
Sync to upstream/release/722
| Commit: | c8cf286 | |
|---|---|---|
| Author: | Andy Friesen | |
| Committer: | GitHub | |
Sync to upstream/release/721 (#2394) Hey everyone! We have a few nice new things to share: ## Language * Add support for read-only indexers using the syntax `{read T}` or `{read [K]: V}`. Read-only indexers are really useful for functions that accept an array, but don't modify it because calls to such a function can be tested covariantly rather than invariantly: ```luau function print_them_old(a: {Instance}) ... end function print_them_new(a: {read Instance}) ... end local players: {Players} = ... -- We have to reject this call because, for all we know, the -- function could insert non-Players into our Player array! print_them_old(players) -- This function is not allowed to write to the array so -- everything is fine. print_them_new(players) ``` * Fix a unification bug that would result in incorrect inference in cases like `'a <: T | nil` where `'a` is a free type and `T` is an instantiated generic. This would result in incorrect inferences in cases like the following: ```luau local function f<T>(a: T & string): T return a end local b = f("hello") local c = f(("world" :: string)) ``` * First steps toward implementing classes. See [the RFC](https://github.com/luau-lang/rfcs/blob/master/docs/syntax-classes.md) for details. ## Analysis * Ensure that inferred arguments to functions are instantiated. This fixes a class of bugs that could cause type inference to hang and consume lots of memory. * Improve the error that's reported when two table types are only incompatible because of a read/write restriction. This fixes cases where we would report nonsense errors like "number is not a subtype of number." * We had an issue where passing a function type through a type function would cause type inference to discard the data about the parameters' names even if the type was returned verbatim. This is now fixed. ## Interpreter * Adjust the FASTCALL3 inlining cost model to line up with other fastcalls. * Reduce Luau VM interpreter loop stack pressure in Debug/NoOpt builds * Optimize the constant folding pass in the compiler ## Native Code Generation * Introduce ExitSync blocks to help avoid synchronizing the VM stack unnecessarily. * NCG VM exit sync cannot include register from blocks not in a chain. * Add CALLFB instruction and feedback vectors in proto. This will be used to help the runtime know which function calls can be inlined. * Handle repeated IrCmd::LOAD_ENV and switch from table RegisterLink information to SSA info. ## General * You can now pass `--solver=new` or `--solver=old` to `luau-analyze` tool to select the solver you'd like to use. It defaults to the new solver. ## Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Ilya Rezvov <irezvov@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> --------- Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Annie Tang <98965493+annieetang@users.noreply.github.com> Co-authored-by: Ilya Rezvov <irezvov@roblox.com>
| Commit: | 429cf05 | |
|---|---|---|
| Author: | Andy Friesen | |
| Committer: | Andy Friesen | |
Sync to upstream/release/721
| Commit: | 231a59c | |
|---|---|---|
| Author: | Ilya Rezvov | |
| Committer: | GitHub | |
Sync to upstream/release/718 (#2359) It is new Friday and new Luau release! This release is mostly focused on improving integer support in Luau VM: - NCG integer lowerings for x64 and Arm64 were added by @tommyscholly (HUGE!) - FASTCALL2K support for integers and other integer fastcall fixes - Test coverage for integers was improved Also: - BytecodeGraph representation is introduced for coming Bytecode -> Bytecode inliner and optimizer - Improved type alias resolution - Fix for constraints resolution of MetatableTypes in LValue position Co-authored-by: Andy Friesen [afriesen@roblox.com](mailto:afriesen@roblox.com) Co-authored-by: Ilya Rezvov [irezvov@roblox.com](mailto:irezvov@roblox.com) Co-authored-by: Thomas Schollenberger [tschollenberger@roblox.com](mailto:tschollenberger@roblox.com) Co-authored-by: Vyacheslav Egorov [vegorov@roblox.com](mailto:vegorov@roblox.com) --------- Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Annie Tang <98965493+annieetang@users.noreply.github.com>
| Commit: | f3f946b | |
|---|---|---|
| Author: | Ilya Rezvov | |
Sync to upstream/release/718
| Commit: | 40d4815 | |
|---|---|---|
| Author: | Sora Kanosue | |
| Committer: | GitHub | |
Sync to upstream/release/715 (#2325) The Luau team has been cooking for this week's release! 🍳 We have implemented an initial version of the [64-bit Integer Type](https://rfcs.luau.org/type-long-integer.html)! Please keep in mind that although the RFC has been accepted, we are currently in the process of identifying and fixing bugs, which may require amending the original RFC. Additionally, we've been working on the following: ### Analysis - Fix crash reported in #2305. - Reword type-function error messages. - Fix various crashes found by fuzzer and in unit tests. - Rework how we track generalizable free types. ### Runtime - NCG: Propagate register tags across block chains. - NCG: Fix a bug in how register information was set up when entering a new block. - NCG: Fix a bug where register tag information for non-live registers was incorrectly propagated. - NCG: Remove duplicate stores of doubles and integers. - NCG: Unconditionally provide tags to read/write functions for buffers. ### Miscellaneous - Various Makefile, lldb_formatter, and lldb-dap improvements. --- Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: David Cope <dcope@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: James McNellis <jmcnellis@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Thomas Schollenberger <tschollenberger@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> --------- Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <arielweiss@roblox.com> Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com>
| Commit: | c324b79 | |
|---|---|---|
| Author: | Sora Kanosue | |
Sync to upstream/release/715
| Commit: | 5189ad9 | |
|---|---|---|
| Author: | Andy Friesen | |
| Committer: | GitHub | |
Sync to upstream/release/689 (#1981) # General Improvements * Fix a crash that could occur when the `deprecated` attribute is used in a syntactically incorrect way. * Improve stack utilization in the parser. This should make it harder for deeply nested constructs to exhaust the C stack. * Fixed the `xpcall` continuation to handle errors handling the same way as main execution path. * The fuzzer now enables all Luau flags.. * The fuzzer will now add attributes and create table literal expressions. * The type of `rawget` is now `<K, V>(tab: {[K]: V}, k: K) -> V?` to reflect the fact that it returns `nil` when the key is not present. * Implement native codegen lowering for `vector.lerp` # Autocomplete * Autocomplete will also now suggest hot comments like `--!strict` and `--!optimize` * Incremental autocomplete had a bug where it wasn't selecting the correct refinement of the autocomplete subject. This is now fixed. # New Solver * Fix an incorrect refinement that caused autocomplete to fail on statements of the following form: `if #some_local.` * Improve the error feedback when a type function is not passed required arguments. (ie no `<>` afterward at all) * Improvements to bidirectional table inference ## Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Annie Tang <annietang@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Ilya Rezvov <irezvov@roblox.com> Co-authored-by: Sora Kanosue <skanosue@roblox.com> Co-authored-by: Varun Saini <vsaini@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> --------- Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Alexander Youngblood <ayoungblood@roblox.com> Co-authored-by: Menarul Alam <malam@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Vighnesh <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
The documentation is generated from this commit.
| Commit: | 4e6525e | |
|---|---|---|
| Author: | Andy Friesen | |
Sync to upstream/release/689
The documentation is generated from this commit.
| Commit: | 713ee2f | |
|---|---|---|
| Author: | Andy Friesen | |
| Committer: | GitHub | |
Sync to upstream/release/678 (#1878) # What's Changed? We've been hard at work fixing bugs in the new type solver and getting it ready to go! ## Native Codegen * Specialized Luau Codegen instruction for fetching an import. As a reminder, an import is an expression like `global.thing` and covers stuff like libraries without fastcalls `coroutine.resume`) and atomic extern libraries. ## New Type Solver * Fix an issue that prevented eager generalization from working properly with OO styled code. * Avoid copying uninitialized memory in Luau attribute parsing * Improve type inference of unsealed tables. * This fixes https://github.com/luau-lang/luau/issues/1838 * and https://github.com/luau-lang/luau/issues/1859 * Infer potential singleton string keys in autocomplete when the expected index type is a union type. * Avoid creating cyclic types when reducing types of the form `t1 where t1 = refine<T, t1, Y>` * The type cloner now does the same thing for the new and old solvers. * Properly infer polarity (aka variance) for divergent table properties. (ie tables whose read type and write type are not the same) * Crash fixes. --------- Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com> Co-authored-by: Alexander Youngblood <ayoungblood@roblox.com> Co-authored-by: Menarul Alam <malam@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Vighnesh <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
| Commit: | 1234321 | |
|---|---|---|
| Author: | Andy Friesen | |
Sync to upstream/release/678
| Commit: | 551a43c | |
|---|---|---|
| Author: | Lily Brown | |
| Committer: | GitHub | |
Sync to upstream/release/593 (#1024) - Updated Roblox copyright to 2023 - Floor division operator `//` (implements #832) - Autocomplete now shows `end` within `do` blocks - Restore BraceType when using `Lexer::lookahead` (fixes #1019) # New typechecker - Subtyping tests between metatables and tables - Subtyping tests between string singletons and tables - Subtyping tests for class types # Native codegen - Fixed macOS test failure (wrong spill restore offset) - Fixed clobbering of non-volatile xmm registers on Windows - Fixed wrong storage location of SSA reg spills - Implemented A64 support for add/sub extended - Eliminated zextReg from A64 lowering - Remove identical table slot lookups - Propagate values from predecessor into the linear block - Disabled reuse slot optimization - Keep `LuaNode::val` check for nil when optimizing `CHECK_SLOT_MATCH` - Implemented IR translation of `table.insert` builtin - Fixed mmap error handling on macOS/Linux # Tooling - Used `|` as a column separator instead of `+` in `bench.py` - Added a `table.sort` micro-benchmark - Switched `libprotobuf-mutator` to a less problematic version
| Commit: | 397dbb1 | |
|---|---|---|
| Author: | Lily Brown | |
Sync to upstream/release/593
| Commit: | 4a2e801 | |
|---|---|---|
| Author: | vegorov-rbx | |
| Committer: | GitHub | |
Sync to upstream/release/560 (#810) * For autocomplete, additional information is included in Scope for type alias name locations and names of imported modules * Improved autocomplete suggestions in 'for' and 'while' loop headers * String match functions return types are now optional strings and numbers because match is not guaranteed at runtime * Fixed build issue on gcc 11 and up (Fixes https://github.com/Roblox/luau/issues/806)
| Commit: | eec289a | |
|---|---|---|
| Author: | Vyacheslav Egorov | |
Sync to upstream/release/560
| Commit: | c7eca27 | |
|---|---|---|
| Author: | Arseny Kapoulkine | |
| Committer: | GitHub | |
Sync to upstream/release/516 (#397)
| Commit: | a8eabed | |
|---|---|---|
| Author: | Arseny Kapoulkine | |
Sync to upstream/release/516
| Commit: | d47b2f1 | |
|---|---|---|
| Author: | Arseny Kapoulkine | |
| Committer: | GitHub | |
Sync to upstream/release/504 (#200) - Type mismatch errors now show detailed information for compound types, highlighting the mismatching component - Fix string.pack bug on ARM when packing negative numbers using unsigned formats - Implement bit32.countlz/countrz (RFC RFC: bit32.countlz/countrz #89) - Minor compiler throughput optimization (~2% faster compilation) - Improve transpiler behavior for edge cases and better test coverage (not exposed through CLI at the moment) - Improve error recovery when parsing invalid assignments - Build fixes for fuzzing targets
| Commit: | 82d74e6 | |
|---|---|---|
| Author: | Arseny Kapoulkine | |
Sync to upstream/release/504
| Commit: | 4611052 | |
|---|---|---|
| Author: | Arseny Kapoulkine | |
| Committer: | Arseny Kapoulkine | |
Sync to upstream/release/501 (#20) Co-authored-by: Rodactor <rodactor@roblox.com>
| Commit: | d01addc | |
|---|---|---|
| Author: | Arseny Kapoulkine | |
| Committer: | Arseny Kapoulkine | |
Sync to upstream/release/501 (#20) Co-authored-by: Rodactor <rodactor@roblox.com>