Cleanup BuiltInConstructor constants to ensure no additional allocations#4464
Merged
jedel1043 merged 3 commits intoboa-dev:mainfrom Oct 14, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4464 +/- ##
==========================================
+ Coverage 47.24% 51.43% +4.19%
==========================================
Files 476 504 +28
Lines 46892 51411 +4519
==========================================
+ Hits 22154 26444 +4290
- Misses 24738 24967 +229 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e773cf2 to
cfdd49d
Compare
Test262 conformance changes
|
Comment on lines
+393
to
+415
| #[cfg(debug_assertions)] | ||
| { | ||
| assert!( | ||
| self.prototype_storage.len() | ||
| <= self.prototype_storage_slots_expected + Self::OWN_PROTOTYPE_STORAGE_SLOTS, | ||
| "expected to allocate at most {} prototype storage slots, got {}. \ | ||
| constant {}::PROTOTYPE_STORAGE_SLOTS may need to be adjusted", | ||
| self.prototype_storage_slots_expected, | ||
| self.prototype_storage.len() - Self::OWN_PROTOTYPE_STORAGE_SLOTS, | ||
| self.name.display_escaped(), | ||
| ); | ||
| assert!( | ||
| self.constructor_storage.len() | ||
| <= self.constructor_storage_slots_expected | ||
| + Self::OWN_CONSTRUCTOR_STORAGE_SLOTS, | ||
| "expected to allocate at most {} constructor storage slots, got {}. \ | ||
| constant {}::CONSTRUCTOR_STORAGE_SLOTS may need to be adjusted", | ||
| self.constructor_storage_slots_expected, | ||
| self.constructor_storage.len() - Self::OWN_CONSTRUCTOR_STORAGE_SLOTS, | ||
| self.name.display_escaped(), | ||
| ); | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
This is a great idea to have a debug assertion to check
jasonwilliams
approved these changes
Oct 13, 2025
Member
jasonwilliams
left a comment
There was a problem hiding this comment.
LGTM apart from comment
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.
Cleanup some of the
BuiltInConstructorconstants to ensure the constants are more descriptive and the pushed properties don't exceeded the defined allocated property slots.