-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync to upstream/release/655 #1563
Merged
Merged
Conversation
This file contains 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
Co-authored-by: Alexander McCord <[email protected]> Co-authored-by: Andy Friesen <[email protected]> Co-authored-by: Aviral Goel <[email protected]> Co-authored-by: David Cope <[email protected]> Co-authored-by: Lily Brown <[email protected]> Co-authored-by: Vyacheslav Egorov <[email protected]>
> 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.
## 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 <[email protected]> Co-authored-by: Andy Friesen <[email protected]> Co-authored-by: Aviral Goel <[email protected]> Co-authored-by: Hunter Goldstein <[email protected]> Co-authored-by: Varun Saini <[email protected]> Co-authored-by: Vighnesh Vijay <[email protected]> Co-authored-by: Vyacheslav Egorov <[email protected]>
* Luau: support dead store elimination for STORE_VECTOR instruction * Fixed hang when Luau class declaration props are incorrectly separated * Provide properties and a metatable for Luau built-in vector type * Pick the correct global scope based on the solver * Conversational AI gets all required scripts as context * Clip LuauRequireCyclesDontAlwaysReturnAny * Fix Parentheses in Fragment Autocomplete * Remove write-only locals in `Luau::getDocumentOffsets` * The lexer can resume parsing from any arbitrary position * Added support for 'thread' and 'buffer' primitive types in Luau user-defined type functions --------- Co-authored-by: Andrew Miranti <[email protected]> Co-authored-by: Andy Friesen <[email protected]> Co-authored-by: Hunter Goldstein <[email protected]> Co-authored-by: Shiqi Ai <[email protected]> Co-authored-by: Vighnesh Vijay <[email protected]> Co-authored-by: Vyacheslav Egorov <[email protected]> Co-authored-by: Yohoo Lin <[email protected]>
* General - Fix the benchmark require wrapper function to work in Lua - Fix memory leak in the new Luau C API test * New Solver - Luau: type functions should be able to signal whether or not irreducibility is due to an error - Do not generate extra expansion constraint for uninvoked user-defined type functions - Print in a user-defined type function should be reported as an error instead of logging to stdout - Many e-graphs bugfixes and performance improvements - Many general bugfixes and improvements to the new solver as a whole - Fixed issue with Luau used-defined type functions not having all environments initialized - Infer types of globals under new type solver * Fragment Autocomplete - Miscellaneous fixes to make interop with the old solver better * Runtime - Support disabling specific Luau built-in functions from being fast-called or constant-evaluated - Added constant folding for vector arithmetic - Added constant propagation and type inference for Vector3 globals ---------------------------------------------------------- 9 contributors: Co-authored-by: Aaron Weiss <[email protected]> Co-authored-by: Andy Friesen <[email protected]> Co-authored-by: Aviral Goel <[email protected]> Co-authored-by: Daniel Angel <[email protected]> Co-authored-by: Jonathan Kelaty <[email protected]> Co-authored-by: Hunter Goldstein <[email protected]> Co-authored-by: Varun Saini <[email protected]> Co-authored-by: Vighnesh Vijay <[email protected]> Co-authored-by: Vyacheslav Egorov <[email protected]>
vegorov-rbx
approved these changes
Dec 13, 2024
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.
New Solver
Fragment Autocomplete
Runtime
disabledBuiltins
accepts a list of library function names like "tonumber" or "math.cos"librariesWithKnownMembers
accepts a list of libraries for members of which a request for constant value and/or type will be madelibraryMemberTypeCb
callback is called to get the type of a global, return one of theLuauBytecodeType
values. 'boolean', 'number', 'string' and 'vector' type are supported.libraryMemberConstantCb
callback is called to setup the constant value of a global. To set a value, C APIluau_set_compile_constant_*
or C++ APIsetCompileConstant*
functions should be used.Co-authored-by: Aaron Weiss [email protected]
Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Aviral Goel [email protected]
Co-authored-by: Daniel Angel [email protected]
Co-authored-by: Jonathan Kelaty [email protected]
Co-authored-by: Hunter Goldstein [email protected]
Co-authored-by: Varun Saini [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]