You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone! We've been hard at work fixing bugs and improving native
codegen. Enjoy!
# Analysis
* Rename the class tag to extern in type functions
* Fix#2204
* Rework type unification in terms of subtyping.
This uses the new solver's understanding of subtyping to drive
unification for
some internal callsites. This is a broad change that should result in
more
consistent inference. For example:
```luau
local function sum<T>(x: T, y: T, z: (T, T) -> T) return z(x, y) end
local function sumrec(f: typeof(sum))
return sum(2, 3, function<X>(g: X, h: X): add<X, X> return g + h end)
end
-- Prior we would claim that `b` is of type `add<X, X> | number`: not
good!
-- We now correctly claim that it is of type `number` thanks to bug
fixes
-- made to subtyping that did not make their way to the unifier.
local b = sumrec(sum)
```
# Native Codegen
* Improve vector handling in binary operations
* Fix missed optimization causing an assertion failure
* Propagate loads of STORE_VECTOR components produced by UINT_TO_FLOAT
* Constant-fold new operand of CHECK_BUFFER_LEN
* For register load-store propagation, use the second operand only for
LOAD_FLOAT
* TValue store cannot be removed when it's partially over-written
* Rework equality and ordering comparisons to fix issues and be more
type aware
* Migrate Luau NCG IrInst operands representation to SmallVector
# Runtime
* Fix 64-bit countrz to build on 32 bit Windows.
* Remap Luau local debug and type information after performing jump
expansion
* Add support for building Luau as a shared library
* Luau should be able to make fastcalls even if library name is obscured
by a local polyfill
# OSS Contributions
* #2163
* #2167
# Internal Contributors
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: 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>
Co-authored-by: Ilya Rezvov <irezvov@roblox.com>
Co-authored-by: Ariel Weiss <arielweiss@roblox.com>
// MagicFreeze is a magic function because table.freeze is a bounded version of the identity function with a custom output (accepts any subtype of `table` and returns a read-only version of that table).
1750
+
// MagicFreeze is a magic function because table.freeze is a bounded version of the identity function with a custom output (accepts any subtype of
1751
+
// `table` and returns a read-only version of that table).
// TODO (CLI-185019): We ideally want to report a Count Mismatch error if there's no head but a variadic tail, but CountMismatch requires actual count size, which we don't have with variadic tails, so we can't report it properly yet.
1773
-
// Instead, we continue to typecheck with the first argument in the variadic tail and report a type mismatch error based on that, which is more informative than reporting a count mismatch where the head (paramTypes.size()) is 0.
1773
+
// TODO (CLI-185019): We ideally want to report a Count Mismatch error if there's no head but a variadic tail, but CountMismatch requires
1774
+
// actual count size, which we don't have with variadic tails, so we can't report it properly yet. Instead, we continue to typecheck with the
1775
+
// first argument in the variadic tail and report a type mismatch error based on that, which is more informative than reporting a count
1776
+
// mismatch where the head (paramTypes.size()) is 0.
// If we can't get a type from the type or type pack, we testIsSubtype against the entire context's argument type pack to report a Type Pack Mismatch error.
1787
+
// If we can't get a type from the type or type pack, we testIsSubtype against the entire context's argument type pack to report a Type Pack
0 commit comments