pass a state parameter to useratom#2256
Merged
vegorov-rbx merged 1 commit intoluau-lang:masterfrom Feb 26, 2026
Merged
Conversation
vegorov-rbx
approved these changes
Feb 26, 2026
Collaborator
|
Thank you for the improvement. |
aatxe
added a commit
that referenced
this pull request
Mar 6, 2026
Hi there, folks! We're back with another weekly Luau release! # Language * Adds the `const` keyword for defining constant bindings that are statically forbidden to be reassigned to. This implements [luau-lang/rfcs#166](luau-lang/rfcs#166). * Adds a collection of new math constants to Luau's `math` library per [luau-lang/rfcs#169](luau-lang/rfcs#169). # Analysis * Fixes a class of bugs where Luau would not retain reasonable upper or lower bounds on free types, resulting in types snapping to `never` or `unknown` despite having bounds. ```luau --!strict -- `lines` will be inferred to be of `{ string }` now, and prior -- was local lines = {} table.insert(lines, table.concat({}, "")) print(table.concat(lines, "\n")) ``` ```luau --!strict -- `buttons` will be inferred to be of type `{ { a: number } }` local buttons = {} table.insert(buttons, { a = 1 }) table.insert(buttons, { a = 2, b = true }) table.insert(buttons, { a = 3 }) ``` * Disables the type error from `string.format` when called with a dynamically-determined format string (i.e. a non-literal string argument with the type `string`) in response to user feedback about it being too noisy. * Resolves an ICE that could occur when type checking curried generic functions. Fixes #2061! * Fixes false positive type errors from doing equality or inequality against `nil` when indexing from a table * In #2256, adds a state parameter to the `useratom` callback for consistency with other callbacks. # Compiler - Improves the compiler's type inference for vector component access, numerical for loops, function return types and singleton type annotations, fixing #2244 #2235 and #2255. # Native Code Generation - Fixes a bug where some operations on x86_64 would produce integers that would take up more than 32-bits when a 32-bit integer is expected. We resolve these issues by properly truncating to 32-bits in these situations. - Improves dead store elimination for conditional jumps and fastcalls arguments, improving overall native codegen performance by about 2% on average in benchmarks, with some benchmarks as high as 25%. --------- Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
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.
Closes #2083.
This PR adds a state parameter to the
useratomcallback. While this is a breaking change, it requires very minimal updates to embedder code.The reasons for this change are in #2083, but again, all other callbacks have state, and in useratom's current form, I must use a global mutable static variable to effectively use it. Which is not ideal.