Commit 4ca11db
Sync to upstream/release/716 (luau-lang#2339)
Hi everyone! Another week, another release 🌺 🐰
This week we've made some major performance boosts for property
accesses, feature fixes, as well as our regular bug fixes and
improvements!
### Analysis
* `Luau/OverloadResolution.h` has been renamed to
`Luau/OverloadResolver.h` (to match the struct name)
* Added syntax highlighting for the `const` keyword!
* Fixed an internal compiler error that could occur when type checking
erroneous uses of `const`, for example:
```luau
-- This is not a valid `const` declaration as we require that `const` declarations
-- have values, as it is almost certainly a mistake if they don't (as you cannot assign
-- to them later). Previously this _also_ caused an ICE in the new solver, which is not
-- desirable.
const foobar
return foobar
```
* Fixed a bug that could result in function calls failing to type check
due to ungeneralized free types:
```luau
function add(a, b)
return a + b
end
local vec2 = {}
function vec2.new(x, y)
return setmetatable({ x = x or 0, y = y or 0 }, {
__add = function(v1, v2)
return { x = v1.x + v2.x, y = v1.y + v2.y }
end,
})
end
-- Prior, this would fail to type check and we'd get warnings
-- about ungeneralized types (`number <: 'a` isn't a subtype of blah)
local a = add(vec2.new(0, 0), vec2.new(1, 1))
```
* Fixed a bug where `type(x) == "vector"` always refined `x` to `never`:
```luau
local x: unknown
if type(x) == "vector" then
local y = x -- Prior, x would be `never`
end
```
### Compiler & Runtime
* 10-30% performance improvement for Luau userdata property accesses via
new property descriptor bytecode caching
* Increased precision for `math.noise()`
* Fixed a bug where generic `for` loops were incorrectly optimized when
the global environment was modified
```luau
local env = getfenv(1)
env.next = {1, 2, 3}
-- This will now disable `LOP_FORGPREP_NEXT` optimization, and run successfully
local ok, err = pcall(function()
for k, v in next, {} do end
end)
```
* Added 64-bit Integer output to the AST Json Encoder, and fixed some
bugs from the initial implementation
* NCG: fixed an issue where certain fast-call sequences with multiple
return values could cause incorrect register tracking
* NCG: improved compiler performance by caching register tags and
computing them only when consumed by an instruction
### Miscellaneous
* Improved `lldb` debugger support by adding visualization for
`lua_State`, including a new `set_userdata_type_name` method to
configure the debugger for custom `userdata` structures.
--------------------------------------
Thank you to all our contributors this week!
Co-authored-by: Andy Friesen <afriesen@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: Karl Rehm <krehm@roblox.com>
Co-authored-by: Simone Guggiari <sguggiari@roblox.com>
Co-authored-by: Thomas Schollenberger <tschollenberger@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
Co-authored-by: @PhoenixWhitefire
---------
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>1 parent 40d4815 commit 4ca11db
72 files changed
Lines changed: 2164 additions & 674 deletions
File tree
- Analysis
- include/Luau
- src
- Ast
- include/Luau
- src
- CodeGen
- include/Luau
- src
- Common/include/Luau
- Compiler/src
- VM
- include
- src
- tests
- conformance
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
417 | 429 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
317 | 329 | | |
318 | 330 | | |
319 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
183 | 194 | | |
184 | | - | |
| 195 | + | |
185 | 196 | | |
186 | | - | |
187 | | - | |
188 | 197 | | |
189 | 198 | | |
190 | 199 | | |
| |||
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
198 | 227 | | |
199 | 228 | | |
200 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
1671 | | - | |
| 1671 | + | |
| 1672 | + | |
1672 | 1673 | | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
| 1674 | + | |
| 1675 | + | |
1676 | 1676 | | |
1677 | | - | |
| 1677 | + | |
1678 | 1678 | | |
1679 | | - | |
| 1679 | + | |
1680 | 1680 | | |
1681 | | - | |
1682 | | - | |
| 1681 | + | |
| 1682 | + | |
1683 | 1683 | | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1688 | 1688 | | |
1689 | | - | |
1690 | | - | |
1691 | 1689 | | |
1692 | 1690 | | |
1693 | 1691 | | |
| |||
1714 | 1712 | | |
1715 | 1713 | | |
1716 | 1714 | | |
1717 | | - | |
| 1715 | + | |
| 1716 | + | |
1718 | 1717 | | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
1752 | | - | |
1753 | | - | |
1754 | | - | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1755 | 1727 | | |
| 1728 | + | |
1756 | 1729 | | |
| 1730 | + | |
1757 | 1731 | | |
1758 | 1732 | | |
1759 | 1733 | | |
1760 | | - | |
1761 | | - | |
1762 | | - | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
1769 | 1746 | | |
1770 | 1747 | | |
1771 | 1748 | | |
1772 | 1749 | | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
1773 | 1753 | | |
1774 | | - | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1775 | 1760 | | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
1781 | 1764 | | |
1782 | | - | |
| 1765 | + | |
1783 | 1766 | | |
1784 | 1767 | | |
1785 | 1768 | | |
1786 | | - | |
1787 | | - | |
| 1769 | + | |
| 1770 | + | |
1788 | 1771 | | |
1789 | 1772 | | |
1790 | 1773 | | |
| |||
1811 | 1794 | | |
1812 | 1795 | | |
1813 | 1796 | | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1814 | 1802 | | |
1815 | 1803 | | |
1816 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
1817 | 1823 | | |
1818 | 1824 | | |
1819 | 1825 | | |
| |||
1854 | 1860 | | |
1855 | 1861 | | |
1856 | 1862 | | |
1857 | | - | |
1858 | 1863 | | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
1862 | 1872 | | |
1863 | | - | |
1864 | | - | |
1865 | | - | |
1866 | 1873 | | |
1867 | 1874 | | |
1868 | 1875 | | |
| |||
4049 | 4056 | | |
4050 | 4057 | | |
4051 | 4058 | | |
4052 | | - | |
| 4059 | + | |
4053 | 4060 | | |
4054 | 4061 | | |
4055 | 4062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments