Skip to content

Merge 0.747 - #117

Merged
HaroldCindy merged 15 commits into
mainfrom
harold/merge_747
Nov 16, 2026
Merged

HaroldCindy merged 15 commits into
mainfrom
harold/merge_747

Conversation

@HaroldCindy

Copy link
Copy Markdown
Contributor

No description provided.

Iqbal F and others added 15 commits October 20, 2026 13:55
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
# Boo! 🦇 🎃 

In the lead up to next weeks spooky season, we've fixed a few bugs that
have been lurking deep in the bowels of the runtime.

## Runtime Changes
- Fix a bug in DSE(Dead Store Elimination) caused by not invalidating
tags when the corresponding load was overwritten
- Fix an Arm64 crash caused by functions w/ more than 256 constants
overflowing the arm64 immediate size.
- Support Intel Mac libunwind (we just assume you're using libc++)
- INVOKE_FASTPCALL should be registered as being able to invalidate
SafeEnv
- Fix a crash found by our fuzzer due to slot allocations.
- Handful of correctness fixes to Luau integer and bit32 operations -
this affects bit32.lrotate, integer.lrotate, integer.extract/replace.
- Fix a bug caused by silently casting a uint8_t to an int8_t in the
compiler.
- Fixes a bug in FORGLOOP register reservation.

## Type System Changes
- Width subtyping should not inject `nil` as a type for a stand-in
property. Fixes #2625, #2644.
- Fix type pack handling in call tail argument position in nonstrict

## Prototype/Experimental projects
- Added runtime support for private class fields

---
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: 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
## New week, new Luau!

### Syntax
- Added support for `while local`/`while const` loops, allowing a single
binding to be declared and scoped to the loop condition and body. (note:
this is behind an experimental flag)

For example:
```lua
while local line = reader:nextLine() do
    process(line)
end
```

  ### Runtime & performance
  - `table.create` and `table.clear` are now recognized as fast calls.
- Native code generation can now auto-promote frequently-executed
functions to native based on call and loop-iteration counts.

  ### Type checking
  - Implemented normalization of negated intersection types.
- Fixed class method context not being reset in the parser when entering
type functions.
  - Fixed an analysis blow-up on moderately large table-like literals.

  ### C API / embedding
- `lua_EmbedderGc` now returns `int`: the embedder returns nonzero while
it is still making progress, and the GC repeatedly re-invokes it to
reach a fixed point across the VM and embedder heaps.

---------

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>
Co-authored-by: Vighnesh Vijay <vvijay@roblox.com>
Co-authored-by: Andreas Haeberlen <andreas.haeberlen@roblox.com>
Co-authored-by: Thomas Schollenberger <tschollenberger@roblox.com>
…not itself a subtype of `table` (#3090)

The following code now correctly reports a type error:

```luau
local function foo(t: boolean | number | vector | {})
    for i, v in t do
    end
end
```

Flagged behind `LuauTypeCheckGeneralizedIterationSoundness`. Adds 3
golden tests.

The error reporting for the original check (which only raised if the
type had *no* tables at all) has been changed to use a new `NotIterable`
kind instead of `CannotCallNonFunction`. This is flagged behind
`LuauTypeCheckUseNotIterable`.

Fixes #2541.

---------

Co-authored-by: PhoenixWhitefire <86601049+PhoenixWhitefire@users.noreply.github.com>
A new release for Luau is ready and brings in the `while local`
statement form support and a tag guided runtime native recompilation,
among other smaller fixes and improvements!

`while local` allows you to create a binding right inside the `while`
statement condition:
```luau
while local x = fetch() do
    ...
end
```

### Analysis
* Fixed a case of equality constraint producing unnecessary type cycles
* Added auto-complete suggestions for `local` and `const` after `if`,
`elseif` and `while`
* Globals that are read and never assigned no longer leak a blocked type
* Globals used inside type functions no longer have effect on type
inference outside them and report a typechecking error

### Runtime
* Added hash salting for interning string table when
`lua_setpointerencodekey` is called to avoid crafted string sets from
slowing down string operations
* Fixed a crash that could happen in `luau_load` if embedder exposes GC
controls to Luau code
* Functions calling `require` directly are no longer considered for
runtime inlining because that can change require path resolution

### Native Code Generation
* Runtime recompilation now gathers information on tags and userdata
types to specialize the code in arithmetic, field access and namecalls
* Inlining of memory operands into instructions on x64 is now performed
only if there are no conflicting writes

### Classes (experimental)
Ongoing work on [Classes
RFC](luau-lang/rfcs#242) prototype:

* Fixed a crash when class was extending a different class with the same
name, it now correctly refers to the outer class instead of the one
being defined
* An error is now reported when a class inherits a constructor instead
of defining its own

(required flags:
DebugLuauUserDefinedClasses=true,DebugLuauUserDefinedClassesRuntime=true)

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: Vyacheslav Egorov <vegorov@roblox.com>
…recursive calls in `std::any_of` (#3114)

This is causing CI builds to fail. The problematic characters only show
up in comments anyway, so the simplest solution is just removing them.

Proof of correctness:
```bash
> diff -s <(git show HEAD:Ast/src/Confusables.cpp | sed $'s/\xE2\x80\x8E//g') Ast/src/Confusables.cpp
Files /dev/fd/11 and Ast/src/Confusables.cpp are identical
```

The `std::any_of` change addresses another failure that we're seeing in
CI, and this one should be superseded by an incoming change soon.
✈️ !!!

## Analysis

* Avoid stack overflow in degenerate unions and intersection types
* Fix a bug where analysis would permit iteration over non-iterable
types in certain circumstances:

```luau
local function foo(t: boolean | number | vector | {})
    -- This used to be erroneously permitted
    for i, v in t do
    end
end
```

* Fix an ICE in certain scenarios involving global function definitions
within type functions
* Fix an issue where error suppression was too eager to fire.  eg

```luau
-- The error here used to be improperly suppressed.
local _: { read [number]: "hello" } = ... :: { read [any]: string }
```

## Runtime

* Add `luau_loadlazy`: This function is the same as `luau_load`, but
only the main function is built. Other functions are lazy stubs that are
loaded on their first use.
* Do not use removed collapsed phis in BytecodeGraphParser
* Fix luau-lang/luau#3082
* Implement `buffer.readvector*f32` and `buffer.writevector*f32` per
luau-lang/rfcs#198
* Clip all in-progress integer code. See
luau-lang/rfcs#269 for details

## Native Codegen

* Add support accelerated direct userdata access
* Add support for frozen metatable cache access
* Improved runtime rebuild error handling and a loop trip fix
* Exit sync restore for expected tags
* Runtime rebuild log and result callbacks
* Lower thresholds before promotion to native code
* Add a runtime rebuild log and result callbacks to better track VM
promotion.
* Fix register array overflow in LOP_FASTCALL bytecode analysis
* Perform store forwarding for split stores as well

## Classes (experimental)

* Report an error if a class's base constructor isn't called before a
read or write to `self` in its constructor
* Add support for nested and `local` classes

Co-authored-by: Andy Friesen <afriesen@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: 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: 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>
Co-authored-by: Vighnesh Vijay <vvijay@roblox.com>
Co-authored-by: Andreas Haeberlen <andreas.haeberlen@roblox.com>
Co-authored-by: Thomas Schollenberger <tschollenberger@roblox.com>
Should probably just ask upstream to do a UBSan build ;)
@HaroldCindy
HaroldCindy marked this pull request as ready for review November 16, 2026 08:24
@HaroldCindy
HaroldCindy merged commit a02d459 into main Nov 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants