-
Notifications
You must be signed in to change notification settings - Fork 244
Milestone
Description
Removing decorator_store from the nodes is definitely the ultimate goal of this refactoring series. The main obstacle is that we still need the Owned variant for three key scenarios:
- Deserialization - Nodes come back from disk/storage with Owned decorators
- Round-trip conversions - Node → Builder → Node transformations needed for forest operations like merge and rewrite
- Testing - Tests need to create nodes without requiring a full forest
We explored eliminating Owned from add_to_forest() (see the branch linked in this above conversation), but that doesn't solve the three cases above.
This is part of a larger refactoring tracked in #1497. That refactoring would eliminate the need for DecoratorStore in nodes entirely by storing everything in a centralized arena.
The path forward is likely:
- Complete this PR series to hoist decorators to the forest (done after this PR),
- Implement DebugInfo struct (Investigate removing
Decoratorin favor of a newDebugInfo#1776), - Break backwards-compatible serialization to split decorator info (Allow to truncate decorator data when serializing MAST #1580).
- Rewrite the assembler's recursive descent, and refactor to fully commit to decorator info (Performance of current decorator representation #1497) which would remove decorator_store from nodes
So yes, it's absolutely the goal, but it's a multi-step process.
Originally posted by @huitseeker in #2323 (comment)
bobbinth
Sub-issues
Metadata
Metadata
Assignees
Labels
No labels