luau/Analysis/src
Alexander McCord c2ba1058c3
Sync to upstream/release/603 (#1097)
# What's changed?

- Record the location of properties for table types (closes #802)
- Implement stricter UTF-8 validations as per the RFC
(https://github.com/luau-lang/rfcs/pull/1)
- Implement `buffer` as a new type in both the old and new solvers.
- Changed errors produced by some `buffer` builtins to be a bit more
generic to avoid platform-dependent error messages.
- Fixed a bug where `Unifier` would copy some persistent types, tripping
some internal assertions.
- Type checking rules on relational operators is now a little bit more
lax.
- Improve dead code elimination for some `if` statements with complex
always-false conditions

## New type solver

- Dataflow analysis now generates phi nodes on exit of branches.
- Dataflow analysis avoids producing a new definition for locals or
properties that are not owned by that loop.
- If a function parameter has been constrained to `never`, report errors
at all uses of that parameter within that function.
- Switch to using the new `Luau::Set` to replace `std::unordered_set` to
alleviate some poor allocation characteristics which was negatively
affecting overall performance.
- Subtyping can now report many failing reasons instead of just the
first one that we happened to find during the test.
- Subtyping now also report reasons for type pack mismatches.
- When visiting `if` statements or expressions, the resulting context
are the common terms in both branches.

## Native codegen

- Implement support for `buffer` builtins to its IR for x64 and A64.
- Optimized `table.insert` by not inserting a table barrier if it is
fastcalled with a constant.

## Internal Contributors

Co-authored-by: Aaron Weiss <aaronweiss@roblox.com>
Co-authored-by: Alexander McCord <amccord@roblox.com>
Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Arseny Kapoulkine <arseny@roblox.com>
Co-authored-by: Aviral Goel <agoel@roblox.com>
Co-authored-by: Lily Brown <lbrown@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
2023-11-10 13:10:07 -08:00
..
Anyification.cpp Sync to upstream/release/582 (#960) 2023-06-23 23:19:39 -07:00
ApplyTypeFunction.cpp Sync to upstream/release/582 (#960) 2023-06-23 23:19:39 -07:00
AstJsonEncoder.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
AstQuery.cpp Sync to upstream/release/596 (#1050) 2023-09-22 12:12:15 -07:00
Autocomplete.cpp Sync to upstream/release/602 (#1089) 2023-11-03 16:45:04 -07:00
BuiltinDefinitions.cpp Sync to upstream/release/602 (#1089) 2023-11-03 16:45:04 -07:00
Clone.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Constraint.cpp Sync to upstream/release/601 (#1084) 2023-10-27 14:18:41 -07:00
ConstraintGenerator.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
ConstraintSolver.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
DataFlowGraph.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
DcrLogger.cpp Sync to upstream/release/565 (#845) 2023-02-24 13:49:38 -08:00
Def.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Differ.cpp Sync to upstream/release/595 (#1044) 2023-09-15 10:26:59 -07:00
EmbeddedBuiltinDefinitions.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Error.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Frontend.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
GlobalTypes.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Instantiation.cpp Sync to upstream/release/595 (#1044) 2023-09-15 10:26:59 -07:00
IostreamHelpers.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
JsonEmitter.cpp Sync to upstream/release/543 (#657) 2022-09-01 16:14:03 -07:00
Linter.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
LValue.cpp Sync to upstream/release/527 (#491) 2022-05-19 17:02:24 -07:00
Module.cpp Sync to upstream/release/602 (#1089) 2023-11-03 16:45:04 -07:00
NonStrictTypeChecker.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Normalize.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Quantify.cpp Sync to upstream/release/588 (#992) 2023-07-28 08:13:53 -07:00
Refinement.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
RequireTracer.cpp Sync to upstream/release/532 (#545) 2022-06-16 18:05:14 -07:00
Scope.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Simplify.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Substitution.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
Subtyping.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Symbol.cpp Sync to upstream/release/588 (#992) 2023-07-28 08:13:53 -07:00
ToDot.cpp Sync to upstream/release/595 (#1044) 2023-09-15 10:26:59 -07:00
TopoSortStatements.cpp Sync to upstream/release/555 (#768) 2022-12-02 10:09:59 -08:00
ToString.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Transpiler.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TxnLog.cpp Sync to upstream/release/588 (#992) 2023-07-28 08:13:53 -07:00
Type.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TypeArena.cpp Sync to upstream/release/557 (#794) 2023-01-04 12:53:17 -08:00
TypeAttach.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TypeChecker2.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TypedAllocator.cpp Rename Windows.h to windows.h (#1055) 2023-10-03 06:59:44 -07:00
TypeFamily.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TypeInfer.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TypeOrPack.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
TypePack.cpp Sync to upstream/release/575 (#919) 2023-05-05 14:52:49 -07:00
TypePath.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
TypeUtils.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
Unifiable.cpp Sync to upstream/release/571 (#895) 2023-04-07 14:01:29 -07:00
Unifier.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
Unifier2.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00