Repository navigation
runtime: fresh class templates memoize shapes in their own cell (no side tables); node key order after edits - #11823
Merged
Merged
Conversation
…not in a table #11780 kept each per-evaluation class template's final class-object and prototype ShapeIds, slot fills and internal-key transitions in two thread-local maps keyed by template class id (TEMPLATES, PROTOTYPES), both allowlisted in the registry lifetime check. They now live in the template's own record: an image static codegen emits once per template (@perry_ctpl.<cid>), passed to js_class_evaluation_object and js_class_object_set_ctor_caps at the evaluation site and registered on the template's vtable entry for the paths that start from a class object. ShapeIds name one agent's shape records, so the cell answers only the thread that recorded it; any other thread takes the ordinary path. Codegen writes only the cell's length; every record is checked against it. The two allowlist entries are removed: registry_lifetime_check is red on #11780's head without them and green here.
Three gaps in #11780's fresh class objects, each shown by a new fresh_class_object_semantics line that main (a739f6c) gets wrong: - str-own-undefined: an own toString holding undefined was treated as absent, so String(C) returned the class source instead of throwing a TypeError (main before #11780 threw). Presence now decides, whatever the property holds. - str-deleted-static: a static toString the template declares still kept the source text out after delete C.toString removed it from this evaluation, so String(C) gave [object Function]. The class object's own state decides (class_object_registry_serves_static), not the template's declaration. - own-index: getOwnPropertyNames put prototype before integer keys such as a static method named 0.
…cell row, main drift)
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (4)
📒 Files selected for processing (17)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Follow-up to #11780 (fresh classes).
What changed
js_register_class_template_cell). The two entries are removed fromscripts/registry_lifetime_allowlist.json(12 lines, nothing else).runtime_abi_check.py --check-wasm-abipasses).Gates, rebased head 1bea17f vs main f9a65b4, both built and run the same way on perrymaster
Cost (instructions, paired, vs main)