[svn:parrot] r43177 - branches/pmc_freeze_cleanup/src/pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Mon Dec 21 01:34:24 UTC 2009
Author: plobsing
Date: Mon Dec 21 01:34:22 2009
New Revision: 43177
URL: https://trac.parrot.org/parrot/changeset/43177
Log:
use VISIT_PMC_ATTR in key, scheduler, sub, and task PMCs
Modified:
branches/pmc_freeze_cleanup/src/pmc/key.pmc
branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc
branches/pmc_freeze_cleanup/src/pmc/scheduler.pmc
branches/pmc_freeze_cleanup/src/pmc/sub.pmc
branches/pmc_freeze_cleanup/src/pmc/task.pmc
Modified: branches/pmc_freeze_cleanup/src/pmc/key.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/key.pmc Sun Dec 20 16:22:30 2009 (r43176)
+++ branches/pmc_freeze_cleanup/src/pmc/key.pmc Mon Dec 21 01:34:22 2009 (r43177)
@@ -304,18 +304,11 @@
*/
VTABLE void visit(visit_info *info) {
-
- Parrot_Key_attributes *attrs;
- /* at end a PMCNULL is written during thaw, which should stop visiting
- * the key */
-
/* Sometimes visit gets an uninitialized Key. Initialize it. */
if (!PMC_data(SELF))
SELF.init();
- attrs = (Parrot_Key_attributes *)PMC_data(SELF);
- info->thaw_ptr = &attrs->next_key;
- (info->visit_pmc_now)(INTERP, attrs->next_key, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Key, next_key);
}
void freeze(visit_info *info) {
Modified: branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc Sun Dec 20 16:22:30 2009 (r43176)
+++ branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc Mon Dec 21 01:34:22 2009 (r43177)
@@ -709,7 +709,7 @@
/* HLL_info */
if (VTABLE_get_integer(INTERP, info) == VISIT_THAW_NORMAL ||
- VTABLE_get_integer(INTERP, info) == VISIT_THAW_CONSTANTS) {
+ VTABLE_get_integer(INTERP, info) == VISIT_THAW_CONSTANTS) {
pos = &PMC_args(SELF);
}
else
Modified: branches/pmc_freeze_cleanup/src/pmc/scheduler.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/scheduler.pmc Sun Dec 20 16:22:30 2009 (r43176)
+++ branches/pmc_freeze_cleanup/src/pmc/scheduler.pmc Mon Dec 21 01:34:22 2009 (r43177)
@@ -288,18 +288,11 @@
*/
VTABLE void visit(visit_info *info) {
- Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
- PMC **pos;
-
/* 1) visit task list */
- pos = &core_struct->task_list;
- info->thaw_ptr = pos;
- (info->visit_pmc_now)(INTERP, *pos, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, task_list);
/* 2) visit the handlers */
- pos = &core_struct->handlers;
- info->thaw_ptr = pos;
- (info->visit_pmc_now)(INTERP, *pos, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, handlers);
}
Modified: branches/pmc_freeze_cleanup/src/pmc/sub.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/sub.pmc Sun Dec 20 16:22:30 2009 (r43176)
+++ branches/pmc_freeze_cleanup/src/pmc/sub.pmc Mon Dec 21 01:34:22 2009 (r43177)
@@ -626,18 +626,11 @@
*/
VTABLE void visit(visit_info *info) {
- Parrot_Sub_attributes *sub;
-
- PMC_get_sub(INTERP, SELF, sub);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Sub, namespace_name);
- info->thaw_ptr = &sub->namespace_name;
- (info->visit_pmc_now)(INTERP, sub->namespace_name, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Sub, multi_signature);
- info->thaw_ptr = &sub->multi_signature;
- (info->visit_pmc_now)(INTERP, sub->multi_signature, info);
-
- info->thaw_ptr = &sub->outer_sub;
- (info->visit_pmc_now)(INTERP, sub->outer_sub, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Sub, outer_sub);
/*
* XXX visit_pmc_now is wrong, because it breaks
@@ -647,8 +640,8 @@
*
* Therefore the hash must be last during visit for now.
*/
- info->thaw_ptr = &sub->lex_info;
- (info->visit_pmc_now)(INTERP, sub->lex_info, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Sub, lex_info);
+
SUPER(info);
}
Modified: branches/pmc_freeze_cleanup/src/pmc/task.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/task.pmc Sun Dec 20 16:22:30 2009 (r43176)
+++ branches/pmc_freeze_cleanup/src/pmc/task.pmc Mon Dec 21 01:34:22 2009 (r43177)
@@ -396,13 +396,8 @@
*/
VTABLE void visit(visit_info *info) {
- Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF);
- PMC **pos;
-
/* 1) visit code block */
- pos = &core_struct->codeblock;
- info->thaw_ptr = pos;
- (info->visit_pmc_now)(INTERP, *pos, info);
+ VISIT_PMC_ATTR(INTERP, info, SELF, Task, codeblock);
}
/*
More information about the parrot-commits
mailing list