Skip to content

Conversation

@HaroldCindy
Copy link
Contributor

No description provided.

vrn-sn and others added 6 commits November 14, 2025 15:16
Bash apparently support regex with the `=~` operator, so we can have a
more robust check here. This will only accept version strings that are
in the format `0.<version>` where `<version>` is a number with 3 or more
digits.
Implements:
- The modifications to the `math` library type definition
- The new members of the `math` table
- The new fastcalls
- Additional tests
- Constant folding
- 3 new flags: `LuauMathIsNanInfFinite`,
`LuauCompileMathIsNanInfFinite`, `LuauTypeCheckerMathIsNanInfFinite`

, as per RFC https://rfcs.luau.org/math-isnan-isfinite-isinf.html

This PR does not implement NCG
This adds in support for [Explicit type parameter
instantiation](https://rfcs.luau.org/explicit-type-parameter-instantiation.html).

This PR is still a work in progress, but some important notes:

1. Metatables with `__call` are **not** supported. While `t<<A>>()` is
obvious what it should do with `__call`, it's not obvious what `t<<A>>`
on its own would be.
2. Intersection types are not supported at the moment either.

Both of these are possible to bring later.
Hello everyone!
This week we have type inference improvements for refinements and
user-defined type functions as well as new optimizations in Native Code
Generation.

Merged earlier, but now available in the release are implementations of
[math.isnan, math.isinf and math.isfinite for Math
Library](https://rfcs.luau.org/math-isnan-isfinite-isinf.html) RFC and
long awaited [Explicit type parameter
instantiation](https://rfcs.luau.org/explicit-type-parameter-instantiation.html)
RFC!

### What's New
- Fixed a bug that incorrectly allowed chained aliases to depend on
aliases defined in deeper directories
- Added an optional `to_alias_fallback` C API to natively support
host-injected aliases
- Fixed building fuzzers using make
- Fixed serialization of userdata type mappings from `userdataTypes`
compiler option which caused a crash on bytecode load

## Analysis
- Recursion counters have been added to the non-strict mode typechecker
to prevent crashes
- Irreducible user-defined type functions are now marked as solved,
improving consistency of type inference results
- Refinements against `unknown` type now work more consistently,
resulting in more accurate inference
```luau
--!strict

local Class = {}
Class.__index = Class

type Class = setmetatable<{ A: number }, typeof(Class)>

function Class.Foo(x: Class, y: Class, z: Class)
    if y == z then
        return
    end
    local bar = y.A -- correctly infers number instead of any
end
```

## Runtime
- Added load-store optimizations for loading components of a vector in
Native Code Generation (NCG). This should reduce the need to place
repeatedly accessed vector components in locals and improve vector
component shuffling
- NCG will exit to VM earlier when unsafe environment is detected,
reducing work it has to throw away
- NCG will now optimize better across interrupt callback invocations;
interrupts are to observe state and error/yield, general modification of
VM state is not allowed in it

## 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: Varun Saini <vsaini@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
@HaroldCindy HaroldCindy merged commit 82c44cf into main Nov 22, 2025
6 checks passed
@HaroldCindy HaroldCindy deleted the merge_701 branch November 22, 2025 03:39
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.

6 participants