Merged
Conversation
chenrui333
approved these changes
Jan 24, 2025
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
table.clone(fixes #1617).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
FunctionTypethat would be invoked by the type inference engine at the correct point.The problem we'd run into is that they were all
std::functions, 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::functions with a singleshared_ptrto a new interface calledMagicFunction. This slims down the memory footprint of each type by about 50 bytes.The virtual methods of
MagicFunctionhave roughly 1:1 correspondence with the old interface, so updating things should not be too difficult:FunctionType::magicFunctionis nowMagicFunction::handleOldSolverFunctionType::dcrMagicFunctionis nowMagicFunction::inferFunctionType::dcrMagicRefinementis nowMagicFunction::refineFunctionType::dcrMagicTypeCheckis nowMagicFunction::typeCheckFull Changelog: luau-lang/luau@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