#1916: Deprecate freeze, thaw, and thawfinish VTABLEs
-------------------------+--------------------------------------------------
Reporter: whiteknight | Owner: cotto
Type: deprecation | Status: new
Priority: major | Milestone: 3.0
Component: core | Version: master
Severity: low | Keywords: freeze thaw visit
Lang: | Patch:
Platform: all |
-------------------------+--------------------------------------------------
Comment(by whiteknight):
not counting the generated code in src/extend_vtable.c, the vtables
freeze, thaw, thawfinish, and visit are all called exactly once: in
src/packfile/object_serialization.c:Parrot_visit_loop_visit. Here's the
relevant snippet, with some details removed:
{{{
const INTVAL action = VTABLE_get_integer(interp, info);
...
if (action == VISIT_FREEZE_NORMAL)
VTABLE_freeze(interp, current, info);
else
VTABLE_thaw(interp, current, info);
VTABLE_visit(interp, current, info);
}}}
What I am suggesting we do is to move the logic from VTABLE_thaw and
VTABLE_freeze into VTABLE_visit. We have all the information in the info
PMC that we need to select the appropriate behaviors. This is also a
process that we could complete gradually: We can move logic out of
VTABLE_freeze and VTABLE_thaw gradually without breaking anything, and
when we're done we eliminate two vtables.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1916#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets