Commit graph

60 commits

Author SHA1 Message Date
Alexander Youngblood
0bd9321957 Sync to upstream/release/653
## What's Changed?

* Optimized the vector dot product by up to 24%
* Allow for x/y/z/X/Y/Z vector field access by registering a `vector` metatable
with an `__index` method
* Fixed a bug preventing consistent recovery from parse errors in table types.
* Optimized `k*n` and `k+n` when types are known
* Allow fragment autocomplete to handle cases like the automatic insertion of
parens, keywords, strings, etc., while maintaining a correct relative positioning

 ### New Solver

* Added support for 'thread' and 'buffer' primitive types in Luau user-defined
type functions
* Allow for `nil` assignment to tables and classes with indexers

---------

Co-authored-by: Aaron Weiss <aaronweiss@roblox.com>
Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Aviral Goel <agoel@roblox.com>
Co-authored-by: Hunter Goldstein <hgoldstein@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>
2024-11-22 12:37:17 -08:00
Hunter Goldstein
c799a548e4 Sync to version/652
> What's new?

* Fragment Autocomplete: a new API allows for type checking a small
  fragment of code against an existing file, significantly speeding up
  autocomplete performance in large files.

> New Solver

* E-Graphs have landed: this is an ongoing approach to make the new type solver
  simplify types in a more consistent and principled manner, based on
  similar work (e.g.: https://egraphs-good.github.io/).
* Adds support for exported / local user type functions.
* Fixes a set of bugs in which the new solver will fail to complete
  inference for simple expressions with just literals and operators.

> General

* It is now an explicit runtime error to `require` a path with a ".lua" or
  ".luau" extension, and the error message will suggest removing the extension.
  ```
  require("path/to/mymodule.lua")
  ```
* Fixes a bug in which whether two `Symbol`s are equal depends on
  whether the new solver is enabled.
2024-11-08 11:01:20 -08:00
Aaron Weiss
1de169f006 Sync to upstream/release/649 2024-10-25 09:46:08 -07:00
Aaron Weiss
7a7521a7ab Sync to upstream/release/645 2024-09-27 10:11:46 -07:00
Junseo Yoo
fad8aaf0ab Sync to upstream/release/637 2024-08-01 16:25:12 -07:00
Vighnesh
6fd26c55ff Sync to upstream/release/635 2024-07-19 10:21:40 -07:00
Vyacheslav Egorov
816cb1d1c4 Sync to upstream/release/631 2024-06-21 01:23:57 +03:00
Vighnesh
58b98097c5 Sync to upstream/release/630 2024-06-14 09:38:56 -07:00
Andy Friesen
5dd97352c1 Sync to upstream/release/629 2024-06-07 10:09:03 -07:00
Alexander McCord
fede4d6393 Sync to upstream/release/628 2024-05-31 10:46:33 -07:00
Vighnesh
9bce20cb5c Sync to upstream/release/625 2024-05-10 09:17:09 -07:00
Aaron Weiss
67b9145268 Sync to upstream/release/622 2024-04-19 14:04:30 -07:00
Vyacheslav Egorov
0f0c0e4d28 Sync to upstream/release/621 2024-04-12 13:44:40 +03:00
Lily Brown
fb90dc083b Sync with upstream/release/620 2024-03-30 15:49:03 -07:00
Andy Friesen
6fff08b621 Sync to upstream/release/618 2024-03-22 10:21:27 -07:00
Alexander McCord
f27d4f52c3 Sync to upstream/release/617 2024-03-15 14:01:00 -07:00
Vighnesh
22686ef1b0 Sync to upstream/release/614 2024-02-23 10:40:00 -08:00
Alexander McCord
dfa512ba36 Sync to upstream/release/611 2024-02-02 10:20:03 -08:00
Aaron Weiss
0edacdded4 Sync to upstream/release/610 2024-01-26 18:30:40 -08:00
Aaron Weiss
f9c5cdd4fb Sync to upstream/release/607 2023-12-15 12:52:08 -08:00
Alexander McCord
4b68791b2c Sync to upstream/release/603 2023-11-10 10:05:48 -08:00
Lily Brown
8237b2f593 Sync to upstream/release/601 2023-10-27 12:33:36 -07:00
Vighnesh
897a5da14e Sync to upstream/release/600 2023-10-20 13:36:26 -07:00
Aaron Weiss
81681e2948 Sync to upstream/release/596 2023-09-22 11:10:49 -07:00
Andy Friesen
433d966ea8 Sync to upstream/release/591 2023-08-18 10:06:29 -07:00
Andy Friesen
25cc75b096 * Progress toward a diffing algorithm for types. We hope that this will be useful for writing clearer error messages.
* Add a missing recursion limiter in `Unifier::tryUnifyTables`.  This was causing a crash in certain situations.
* Luau heap graph enumeration improvements:
    * Weak references are not reported
    * Added tag as a fallback name of non-string table links
    * Included top Luau function information in thread name to understand where thread might be suspended
* Constant folding for `math.pi` and `math.huge` at -O2
* Optimize `string.format` and `%*`
    * This change makes string interpolation 1.5x-2x faster depending on the number and type of formatted components, assuming a few are using primitive types, and reduces associated GC pressure.

New solver

* Initial work toward tracking the upper and lower bounds of types more accurately.

JIT

* Add IrCmd::CHECK_TRUTHY for improved assert fast-calls
* Do not compute type map for modules without types
* Capture metatable+readonly state for NEW_TABLE IR instructions
* Replace JUMP_CMP_ANY with CMP_ANY and existing JUMP_EQ_INT
* Add support for exits to VM with reentry lock in VmExit
2023-08-04 10:01:35 -07:00
Vyacheslav Egorov
5e1aca164c Sync to upstream/release/588 2023-07-28 14:37:00 +03:00
Vyacheslav Egorov
8bc2f51d89 Sync to upstream/release/582 2023-06-24 08:33:44 +03:00
Andy Friesen
6ee4f190ab Sync to upstream/release/581 2023-06-16 10:01:18 -07:00
Vyacheslav Egorov
b8e9d07b20 Sync to upstream/release/578 2023-05-25 23:46:51 +03:00
Andy Friesen
eb7106016e Sync to upstream/release/577 2023-05-19 11:59:59 -07:00
Vyacheslav Egorov
3247aabf75 Sync to upstream/release/576 2023-05-12 15:15:01 +03:00
Andy Friesen
d5cdb687e0 Sync to upstream/release/573 2023-04-21 14:41:03 -07:00
Vyacheslav Egorov
d1acde36bb Sync to upstream/release/570 2023-03-31 15:21:14 +03:00
Vyacheslav Egorov
e280064f45 Sync to upstream/release/568 2023-03-17 16:59:30 +02:00
Vyacheslav Egorov
9a281f0492 Sync to upstream/release/566 2023-03-03 15:45:38 +02:00
Andy Friesen
1e7b23fbfc Sync to upstream/release/565 2023-02-24 10:24:22 -08:00
Vyacheslav Egorov
5c77305609 Sync to upstream/release/564 2023-02-17 16:53:37 +02:00
Vyacheslav Egorov
eec289ad1b Sync to upstream/release/560 2023-01-20 14:02:39 +02:00
Vyacheslav Egorov
9958d23caa Sync to upstream/release/557 2023-01-03 19:33:19 +02:00
Andy Friesen
abe6768a1d Sync to upstream/release/556 2022-12-09 10:07:25 -08:00
Andy Friesen
f52169509c Sync to upstream/release/554 2022-11-18 10:45:14 -08:00
Vyacheslav Egorov
3155ba0358 Sync to upstream/release/553 2022-11-11 00:04:44 +02:00
Andy Friesen
e3fdab3082 Sync to upstream/release/552 2022-11-04 10:02:37 -07:00
Andy Friesen
2eff6cfe50 Sync to upstream/release/550 2022-10-21 10:33:43 -07:00
Vyacheslav Egorov
d82e73607c Sync to upstream/release/549 2022-10-14 01:59:53 +03:00
Arseny Kapoulkine
91e144ac1b Sync to upstream/release/548 2022-10-06 16:55:58 -07:00
Arseny Kapoulkine
d0989b9e15 Sync to upstream/release/547 2022-09-29 15:11:54 -07:00
Arseny Kapoulkine
48fb5a3483 Sync to upstream/release/546 2022-09-23 11:32:10 -07:00
Arseny Kapoulkine
dd710f67ca Sync to upstream/release/545 2022-09-15 15:13:58 -07:00