Releases: Veslydev/LuauCeption
0.723
LuauCeption Release
Updated to Luau version 0.723.
Luau Upstream Release Notes
Another week, another release!
What's new?
- Implement export semantics as described in luau-lang/rfcs#179.
Analysis
- Use sentinel
Positions in the CST rather thanstd::optionalto reduce memory pressure.
Runtime
- Compiler: Improve dump output for Luau table constants (e.g. when using
luau-compile). - NCG: Record block exit info for all blocks.
- NCG: Reduce spill pressure by using dead VM register store locations.
Full Changelog: luau-lang/luau@0.722...0.723
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Ariel Weiss arielweiss@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
0.722
LuauCeption Release
Updated to Luau version 0.722.
Luau Upstream Release Notes
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.:
-- `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)
endNote: yielding in metamethods is still unsupported, including __iter. Fixes luau-lang/luau#838.
Ast
- Added concrete syntax tree support for expression groups and type groups
-- In the CST, we will now preserve whitespace here ...
local x = (1 + 2 )
-- ... and here ...
type t = (number )Analysis
- Preserve module names for overload detail errors by @haziscool in luau-lang/luau#2398
Runtime
- Introduced a new
CMPPROTObytecode 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
nilvalue as potentially garbage collected. - Add missing include in OptimizeDeadStore.cpp by @bytexenon in luau-lang/luau#2396
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
Full Changelog: luau-lang/luau@0.721...0.722
0.721
LuauCeption Release
Updated to Luau version 0.721.
Luau Upstream Release Notes
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:
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 | nilwhere'ais a free type andTis an instantiated generic. This would result in incorrect inferences in cases like the following:
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 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=newor--solver=oldtoluau-analyzetool 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
0.720
LuauCeption Release
Updated to Luau version 0.720.
Luau Upstream Release Notes
Howdy there, folks! We've got another Luau release this week, mainly focused on some pain points with type analysis!
Note: For folks who are using definition files for providing type definitions for the runtime environment they're working in, we also wanted to highlight that the declare class syntax is being entirely cleaned up finally. We added syntax for declare extern type many months ago, and with the Luau classes RFC accepted, it is particularly prudent that we finalize the cleanup of declare class. If you're still on the old syntax, please update to use declare extern type Foo with ... to avoid interruption when a future release removes declare class entirely.
Language
- The
constkeyword now correctly appears in autocomplete suggestions from Luau.
Analysis
- Fixes false positive
OptionalValueAccesserrors when iterating over a table with an optional indexer type. The VM's generalized iteration already guarantees non-nil values in the loop body, and the type checker now reflects that. Fixes luau-lang/luau#2236.
--!strict
type TypeA = { Value: any }
local list = {} :: { [string]: TypeA? }
for index, a in list do
a.Value = 1 -- No longer incorrectly reported as 'TypeA?' could be nil
end- Improves bidirectional type inference for unions of tables and functions. Table literals that clearly match one branch of a union are no longer falsely rejected:
--!strict
type FnRecord = { handler: (number) -> string, label: string? }
type StrRecord = { handler: string, label: string? }
type Record = FnRecord | StrRecord
-- Previously flagged as not a subtype of `Record`; now correctly accepted as a FnRecord
local r: Record = {
handler = function(input)
return tostring(input)
end,
label = "test",
}- Fixes a crash that could occur when
typeofis used inside the type arguments of an instantiated method call:
local t = {}
function t:f<T>() end
local x = 42
t:f<<typeof(x)>>() -- No longer crashes- Fixes missing autocomplete suggestions for string singleton types when the expected type is an intersection containing a string singleton (e.g.
"Foo" & "Foo"orkeyof<typeof(tbl)> & T).
Compiler
- Fixes a discrepancy where string interpolation would sometimes emit a redundant
MOVEinstruction that an equivalentstring.formatcall would not, when the target register was already correct. (#2324 from @9382, thanks!)
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: 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
0.714
LuauCeption Release
Updated to Luau version 0.714.
Luau Upstream Release Notes
Another week, another release! Happy spring! 🌷
Open-source contributions
- Fix
type(x) == "vector"always refiningxtoneverby @PhoenixWhitefire in luau-lang/luau#2291
Analysis
- Remove an incorrect assertion triggered when we fail to bind a generic pack.
- Various miscellaneous fixes for bugs found by the fuzzer.
Runtime
- Fix
DUPTABLEconstant packing not respecting side-effects. - NCG: fix removal of stores that are still needed in VM exits.
- NCG: fix a bug that caused buffer access ranges to be computed incorrectly.
- Fix #2293.
Miscellaneous
- Various
Makefileimprovements. - Add lldb providers for
Proto. - Add new
--dump-constantsflag toluau-compile.
Full Changelog: luau-lang/luau@0.713...0.714
Co-authored-by: Andy Friesen afriesen@roblox.com
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: Sora Kanosue skanosue@roblox.com
Co-authored-by: Thomas Schollenberger tschollenberger@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
0.713
LuauCeption Release
Updated to Luau version 0.713.
Luau Upstream Release Notes
Hey folks! Another week another Luau release 🙂
Analysis
InsertionOrderedMaphas been moved from theAnalysislibrary toCommon.- Subtyping has been rewritten to avoid extra allocations: there should be no behavioral change from this effort, only somewhat lower memory pressure.
- Fixed a bug where analyzing comparing a value that is too complex to type check against
nilmay cause the type checker to crash. pcallnow handles functions that return no values, for example:
local mod = require('mymodule')
-- Previously, we would error claiming that we only expect one value on the left-hand-side.
-- Now, there is no error and `result` is typed as `unknown`.
local success, result = pcall(function()
mod.dothething()
end)Compiler
- Fixed a bug in
constwhere function statements were excluded from const checks. Fixes #2282
const a = 42
-- The following will now fail to compile.
function a()
end- Table literal "shapes" can now encorporate constant values at bytecode compile time. We store the shape of constant tables if all their keys are constants, which allows slightly faster insertion when building said literals (we can preallocate a table in a particular shape). Now, we can also store constant values, making construction a single bytecode. For example:
-- This snippet ...
return { x = 1, y = 2 }-- ... used to compile to bytecode like ...
DUPTABLE R0 2
LOADN R1 1
SETTABLEKS R1 R0 K0 ['x']
LOADN R1 2
SETTABLEKS R1 R0 K1 ['y']
RETURN R0 1-- ... and now compiles to something like ...
DUPTABLE R0 4
RETURN R0 1Runtime
- Introduced a
@debugnoinlineattribute behind a debug flag. We do not actively plan to ship this but have added it to help test compiler and runtime optimizations. - Fixed a bug where setting a breakpoint in a natively compiled function could crash on ARM64.
- NCG: The data section of generated code is no longer allocated as executable, preventing a class of potential exploits.
Co-authored-by: Andy Friesen afriesen@roblox.com
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: Ilya Rezvov irezvov@roblox.com
Co-authored-by: Tom Schollenberger tschollenberger@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Karim Mouline kmouline@roblox.com
0.712
LuauCeption Release
Updated to Luau version 0.712.
Luau Upstream Release Notes
Analysis
- Fix being able to write to a read-only field in a compound assignment by @PhoenixWhitefire in luau-lang/luau#2290
- Fix luau-lang/luau#1986
- Fix luau-lang/luau#1890
- Minor bugfixes and improvements
Compiler
- Do not constant-fold strings that are longer than 4096 characters. This helps to avoid pathalogical misoptimizations that could result in the compiling bytecode growing very large.
- fix constant placement into the CHECK_BUFFER_LEN 'double source' argument
Contributors
Co-authored-by: Ariel Weiss arielweiss@roblox.com
Co-authored-by: Hunter Goldstein hgoldstein@roblox.com
Co-authored-by: Thomas Schollenberger tschollenberger@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com
Full Changelog: luau-lang/luau@0.711...0.712
0.711
LuauCeption Release
Updated to Luau version 0.711.
Luau Upstream Release Notes
Hi there, folks! We're back with another weekly Luau release!
Language
- Adds the
constkeyword for defining constant bindings that are statically forbidden to be reassigned to. This implements luau-lang/rfcs#166. - Adds a collection of new math constants to Luau's
mathlibrary per luau-lang/rfcs#169.
Analysis
- Fixes a class of bugs where Luau would not retain reasonable upper or lower bounds on free types, resulting in types snapping to
neverorunknowndespite having bounds.
--!strict
-- `lines` will be inferred to be of `{ string }` now, and prior
-- was
local lines = {}
table.insert(lines, table.concat({}, ""))
print(table.concat(lines, "\n"))--!strict
-- `buttons` will be inferred to be of type `{ { a: number } }`
local buttons = {}
table.insert(buttons, { a = 1 })
table.insert(buttons, { a = 2, b = true })
table.insert(buttons, { a = 3 })- Disables the type error from
string.formatwhen called with a dynamically-determined format string (i.e. a non-literal string argument with the typestring) in response to user feedback about it being too noisy. - Resolves an ICE that could occur when type checking curried generic functions. Fixes #2061!
- Fixes false positive type errors from doing equality or inequality against
nilwhen indexing from a table - In #2256, adds a state parameter to the
useratomcallback for consistency with other callbacks.
Compiler
- Improves the compiler's type inference for vector component access, numerical for loops, function return types and singleton type annotations, fixing #2244 #2235 and #2255.
Native Code Generation
- Fixes a bug where some operations on x86_64 would produce integers that would take up more than 32-bits when a 32-bit integer is expected. We resolve these issues by properly truncating to 32-bits in these situations.
- Improves dead store elimination for conditional jumps and fastcalls arguments, improving overall native codegen performance by about 2% on average in benchmarks, with some benchmarks as high as 25%.
Contributors
Co-authored-by: Andy Friesen afriesen@roblox.com
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: Ilya Rezvov irezvov@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
Full Changelog: luau-lang/luau@0.710...0.711
0.710
LuauCeption Release
Updated to Luau version 0.710.
Luau Upstream Release Notes
Hello! Another week with updates to type analysis and fixes in compiler and native code generation.
Breaking C API change: the useratom callback function now has an extra argument for lua_State pointer. If you are using string atom identifiers, add an argument in your handler.
Analysis
- Table types are treated as shape types when normalizing against an extern type. This allows intersections against extern types to provide information on additional properties not declared in an extern type, but present for that particular value:
function take(thing: Instance & { Brushes: Instance })
print(thing)
print(thing.Brushes.Name)
end- Fixed another crash which could happen when auto-complete visits a table with write-only properties
Require library
- During path resolution, we now reset to the requirer's context before
to_alias_overrideis called, enabling embedders to implement context-sensitive alias overrides
Compiler
- In a fast-call fallback sequence,
GETGLOBAL/GETUPVALwill never use extra registers (Fixes #2248)
Native Code Generation
- A counter system has been added which is used by native execution to report regular/fallback block execution and VM side exit statistics. When using
--codegentogether with--countersin Luau REPL,callgrind.outfile is written containing the counter data to view in callgrind/cachegrind tools - Fixed an issue where
setfenvchange could have been ignored, executing fast-paths for longer than is allowed - Stability improvements
Community Contributions
- Pass a state parameter to
useratomby @jackdotink in luau-lang/luau#2256
Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Ariel Weiss arielweiss@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
Full Changelog: luau-lang/luau@0.709...0.710
0.709
LuauCeption Release
Updated to Luau version 0.709.
Luau Upstream Release Notes
We skipped the release last week, but we're back today with some new additions to the VM and Native Code Generation (and as always, improvements to typechecking).
Analysis
- Fixed some instances of "unreduced table types" like { x: number } | { x: number }, especially for data-like arrays (extremely large tables that have the same element of a given type).
-- Prior, hovering would claim `t: {{number} | {number}}`, and now
-- we will claim it is a `{{number}}`
local t = {
{1, 2, 3},
{4, 5, 6}
}- Fixed a bug where user defined type function could crash if passed too many arguments.
- Enables autocomplete to use type information for function arguments to suggest results when those types are variadic. For example:
local function foo(...: "Val1") end
foo(@1)will now suggest "Val1"
- Partially annotated local statements with type packs on the right-hand-side (see example) are now correctly inferred. Prior, we mishandled this case in a way that caused subsequent assignments to assume the first element of the type pack corresponded to the first unannotated element:
local function foo(): (number, boolean, string)
return 1, true "three"
end
-- Prior to this fix, we inferred that `y: number` for this statement ...
local x: number, y, z: string = foo()
-- ... similarly, this would have inferred `z: number` ...
local x: number, y: boolean, z = foo()
-- ... and this would have inferred `y: number` and `z: boolean`
local x: number, y, z = foo()VM
- Fix a use-after-free in
table.find.
Native Code Generation
- Fix a bug in NCG caused by using an incorrect operand in a buffer length check.
- NCG now unmaps executable pages when functions are garbage-collected.
- Provide a native implementation for
math.isnan
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: Vyacheslav Egorov vegorov@roblox.com