mirror of
https://github.com/luau-lang/luau.git
synced 2025-03-03 18:51:42 +00:00
![]()
Some checks failed
benchmark / callgrind (map[branch:main name:luau-lang/benchmark-data], ubuntu-22.04) (push) Has been cancelled
build / macos (push) Has been cancelled
build / macos-arm (push) Has been cancelled
build / ubuntu (push) Has been cancelled
build / windows (Win32) (push) Has been cancelled
build / windows (x64) (push) Has been cancelled
build / coverage (push) Has been cancelled
build / web (push) Has been cancelled
release / macos (push) Has been cancelled
release / ubuntu (push) Has been cancelled
release / windows (push) Has been cancelled
release / web (push) Has been cancelled
## What's Changed ### General - Allow types of tables to diverge after using `table.clone` (fixes #1617). - Allow 2-argument vector.create in Luau. - Fix a crash when suggesting autocomplete after encountering parsing errors. - Add lua_tolstringatom C API which returns the string length (whether or not the atom exists) and which extends the existing lua_tostringatom function the same way lua_tolstring/lua_tostring do. - Luau now retains the DFGs of typechecked modules. ### Magic Functions Migration Note We've made a change to the API used to define magic functions. Previously, we had a set of function pointers on each `FunctionType` that would be invoked by the type inference engine at the correct point. The problem we'd run into is that they were all `std::function`s, we'd grown quite a few of them, and Luau allocates tens of thousands of types as it performs type inference. This adds up to a large amount of memory for data that isn't used by 99% of types. To slim things down a bit, we've replaced all of those `std::function`s with a single `shared_ptr` to a new interface called `MagicFunction`. This slims down the memory footprint of each type by about 50 bytes. The virtual methods of `MagicFunction` have roughly 1:1 correspondence with the old interface, so updating things should not be too difficult: * `FunctionType::magicFunction` is now `MagicFunction::handleOldSolver` * `FunctionType::dcrMagicFunction` is now `MagicFunction::infer` * `FunctionType::dcrMagicRefinement` is now `MagicFunction::refine` * `FunctionType::dcrMagicTypeCheck` is now `MagicFunction::typeCheck` **Full Changelog**: https://github.com/luau-lang/luau/compare/0.657...0.658 --- Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Ariel Weiss <aaronweiss@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Talha Pathan <tpathan@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> |
||
---|---|---|
.. | ||
conformance | ||
require | ||
AnyTypeSummary.test.cpp | ||
AssemblyBuilderA64.test.cpp | ||
AssemblyBuilderX64.test.cpp | ||
AstJsonEncoder.test.cpp | ||
AstQuery.test.cpp | ||
AstQueryDsl.cpp | ||
AstQueryDsl.h | ||
AstVisitor.test.cpp | ||
Autocomplete.test.cpp | ||
BuiltinDefinitions.test.cpp | ||
ClassFixture.cpp | ||
ClassFixture.h | ||
CodeAllocator.test.cpp | ||
Compiler.test.cpp | ||
Config.test.cpp | ||
Conformance.test.cpp | ||
ConformanceIrHooks.h | ||
ConstraintGeneratorFixture.cpp | ||
ConstraintGeneratorFixture.h | ||
ConstraintSolver.test.cpp | ||
CostModel.test.cpp | ||
DataFlowGraph.test.cpp | ||
DenseHash.test.cpp | ||
DiffAsserts.cpp | ||
DiffAsserts.h | ||
Differ.test.cpp | ||
EqSat.language.test.cpp | ||
EqSat.propositional.test.cpp | ||
EqSat.slice.test.cpp | ||
EqSatSimplification.test.cpp | ||
Error.test.cpp | ||
Fixture.cpp | ||
Fixture.h | ||
FragmentAutocomplete.test.cpp | ||
Frontend.test.cpp | ||
Generalization.test.cpp | ||
InsertionOrderedMap.test.cpp | ||
Instantiation2.test.cpp | ||
IostreamOptional.h | ||
IrBuilder.test.cpp | ||
IrCallWrapperX64.test.cpp | ||
IrLowering.test.cpp | ||
IrRegAllocX64.test.cpp | ||
JsonEmitter.test.cpp | ||
Lexer.test.cpp | ||
Linter.test.cpp | ||
LValue.test.cpp | ||
main.cpp | ||
Module.test.cpp | ||
NonstrictMode.test.cpp | ||
NonStrictTypeChecker.test.cpp | ||
Normalize.test.cpp | ||
NotNull.test.cpp | ||
Parser.test.cpp | ||
RegisterCallbacks.cpp | ||
RegisterCallbacks.h | ||
Repl.test.cpp | ||
RequireByString.test.cpp | ||
RequireTracer.test.cpp | ||
RuntimeLimits.test.cpp | ||
ScopedFlags.h | ||
Set.test.cpp | ||
SharedCodeAllocator.test.cpp | ||
Simplify.test.cpp | ||
StringUtils.test.cpp | ||
Subtyping.test.cpp | ||
Symbol.test.cpp | ||
ToDot.test.cpp | ||
TopoSort.test.cpp | ||
ToString.test.cpp | ||
Transpiler.test.cpp | ||
TxnLog.test.cpp | ||
TypeFunction.test.cpp | ||
TypeFunction.user.test.cpp | ||
TypeInfer.aliases.test.cpp | ||
TypeInfer.annotations.test.cpp | ||
TypeInfer.anyerror.test.cpp | ||
TypeInfer.builtins.test.cpp | ||
TypeInfer.cfa.test.cpp | ||
TypeInfer.classes.test.cpp | ||
TypeInfer.definitions.test.cpp | ||
TypeInfer.functions.test.cpp | ||
TypeInfer.generics.test.cpp | ||
TypeInfer.intersectionTypes.test.cpp | ||
TypeInfer.loops.test.cpp | ||
TypeInfer.modules.test.cpp | ||
TypeInfer.negations.test.cpp | ||
TypeInfer.oop.test.cpp | ||
TypeInfer.operators.test.cpp | ||
TypeInfer.primitives.test.cpp | ||
TypeInfer.provisional.test.cpp | ||
TypeInfer.refinements.test.cpp | ||
TypeInfer.singletons.test.cpp | ||
TypeInfer.tables.test.cpp | ||
TypeInfer.test.cpp | ||
TypeInfer.tryUnify.test.cpp | ||
TypeInfer.typePacks.test.cpp | ||
TypeInfer.typestates.test.cpp | ||
TypeInfer.unionTypes.test.cpp | ||
TypeInfer.unknownnever.test.cpp | ||
TypePack.test.cpp | ||
TypePath.test.cpp | ||
TypeVar.test.cpp | ||
Unifier2.test.cpp | ||
Variant.test.cpp | ||
VecDeque.test.cpp | ||
VisitType.test.cpp |