Ticket #1062: obj_alive.patch

File obj_alive.patch, 33.4 KB (added by NotFound, 12 years ago)
  • src/pmc/role.pmc

     
    256256    VTABLE void mark() { 
    257257        Parrot_Role_attributes * const role = PARROT_ROLE(SELF); 
    258258 
    259         if (role->name) 
    260             Parrot_gc_mark_PObj_alive(interp, (PObj *)role->name); 
    261         if (role->_namespace) 
    262             Parrot_gc_mark_PObj_alive(interp, (PObj *)role->_namespace); 
    263         if (role->roles) 
    264             Parrot_gc_mark_PObj_alive(interp, (PObj *)role->roles); 
    265         if (role->methods) 
    266             Parrot_gc_mark_PObj_alive(interp, (PObj *)role->methods); 
    267         if (role->attrib_metadata) 
    268             Parrot_gc_mark_PObj_alive(interp, (PObj *)role->attrib_metadata); 
     259        Parrot_gc_mark_STRING_alive(interp, role->name); 
     260        Parrot_gc_mark_PMC_alive(interp, role->_namespace); 
     261        Parrot_gc_mark_PMC_alive(interp, role->roles); 
     262        Parrot_gc_mark_PMC_alive(interp, role->methods); 
     263        Parrot_gc_mark_PMC_alive(interp, role->attrib_metadata); 
    269264    } 
    270265 
    271266/* 
  • src/pmc/packfilesegment.pmc

     
    6363        Parrot_PackfileSegment_attributes * attrs = 
    6464                PARROT_PACKFILESEGMENT(SELF); 
    6565 
    66         if (!PMC_IS_NULL(attrs->directory)) 
    67             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->directory); 
     66        Parrot_gc_mark_PMC_alive(interp, attrs->directory); 
    6867    } 
    6968 
    7069/* 
  • src/pmc/packfilefixuptable.pmc

     
    6161        Parrot_PackfileFixupTable_attributes * attrs = 
    6262                PARROT_PACKFILEFIXUPTABLE(SELF); 
    6363 
    64         if (!PMC_IS_NULL(attrs->entries)) 
    65             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->entries); 
     64        Parrot_gc_mark_PMC_alive(interp, attrs->entries); 
    6665 
    6766        SUPER(); 
    6867    } 
  • src/pmc/class.pmc

     
    589589 
    590590    VTABLE void mark() { 
    591591        Parrot_Class_attributes * const _class = PARROT_CLASS(SELF); 
    592         if (_class->name) 
    593             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->name); 
    594         if (_class->fullname) 
    595             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->fullname); 
    596         if (_class->_namespace) 
    597             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->_namespace); 
    598         if (_class->parents) 
    599             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->parents); 
    600         if (_class->all_parents) 
    601             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->all_parents); 
    602         if (_class->roles) 
    603             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->roles); 
    604         if (_class->methods) 
    605             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->methods); 
    606         if (_class->vtable_overrides) 
    607             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->vtable_overrides); 
    608         if (_class->parent_overrides) 
    609             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->parent_overrides); 
    610         if (_class->attrib_metadata) 
    611             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->attrib_metadata); 
    612         if (_class->attrib_index) 
    613             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->attrib_index); 
    614         if (_class->attrib_cache) 
    615             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->attrib_cache); 
    616         if (_class->resolve_method) 
    617             Parrot_gc_mark_PObj_alive(interp, (PObj *)_class->resolve_method); 
     592        Parrot_gc_mark_STRING_alive(interp, _class->name); 
     593        Parrot_gc_mark_STRING_alive(interp, _class->fullname); 
     594        Parrot_gc_mark_PMC_alive(interp, _class->_namespace); 
     595        Parrot_gc_mark_PMC_alive(interp, _class->parents); 
     596        Parrot_gc_mark_PMC_alive(interp, _class->all_parents); 
     597        Parrot_gc_mark_PMC_alive(interp, _class->roles); 
     598        Parrot_gc_mark_PMC_alive(interp, _class->methods); 
     599        Parrot_gc_mark_PMC_alive(interp, _class->vtable_overrides); 
     600        Parrot_gc_mark_PMC_alive(interp, _class->parent_overrides); 
     601        Parrot_gc_mark_PMC_alive(interp, _class->attrib_metadata); 
     602        Parrot_gc_mark_PMC_alive(interp, _class->attrib_index); 
     603        Parrot_gc_mark_PMC_alive(interp, _class->attrib_cache); 
     604        Parrot_gc_mark_PMC_alive(interp, _class->resolve_method); 
    618605    } 
    619606 
    620607 
  • src/pmc/string.pmc

     
    7575    VTABLE void mark() { 
    7676        STRING *str_val; 
    7777        GET_ATTR_str_val(INTERP, SELF, str_val); 
    78  
    79         if (str_val) 
    80             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)str_val); 
     78        Parrot_gc_mark_STRING_alive(INTERP, str_val); 
    8179    } 
    8280 
    8381/* 
  • src/pmc/object.pmc

     
    190190        if (PARROT_OBJECT(SELF)) { 
    191191            Parrot_Object_attributes * const obj = PARROT_OBJECT(SELF); 
    192192 
    193             if (obj->_class) 
    194                 Parrot_gc_mark_PObj_alive(interp, (PObj*)obj->_class); 
    195             if (obj->attrib_store) 
    196                 Parrot_gc_mark_PObj_alive(interp, (PObj*)obj->attrib_store); 
     193            Parrot_gc_mark_PMC_alive(interp, obj->_class); 
     194            Parrot_gc_mark_PMC_alive(interp, obj->attrib_store); 
    197195        } 
    198196    } 
    199197 
  • src/pmc/exporter.pmc

     
    134134        GET_ATTR_ns_dest(INTERP, SELF, ns_dest); 
    135135        GET_ATTR_globals(INTERP, SELF, globals); 
    136136 
    137         if (ns_src) 
    138             Parrot_gc_mark_PObj_alive(interp, (PObj *)ns_src); 
    139         if (ns_dest) 
    140             Parrot_gc_mark_PObj_alive(interp, (PObj *)ns_dest); 
    141         if (globals) 
    142             Parrot_gc_mark_PObj_alive(interp, (PObj *)globals); 
     137        Parrot_gc_mark_PMC_alive(interp, ns_src); 
     138        Parrot_gc_mark_PMC_alive(interp, ns_dest); 
     139        Parrot_gc_mark_PMC_alive(interp, globals); 
    143140    } 
    144141 
    145142 
  • src/pmc/eventhandler.pmc

     
    123123        Parrot_EventHandler_attributes * const e = PARROT_EVENTHANDLER(SELF); 
    124124 
    125125        if (e) { 
    126             if (e->type) 
    127                 Parrot_gc_mark_PObj_alive(INTERP, (PObj *)e->type); 
     126            Parrot_gc_mark_STRING_alive(INTERP, e->type); 
     127            Parrot_gc_mark_PMC_alive(INTERP, e->interp); 
     128            Parrot_gc_mark_PMC_alive(INTERP, e->code); 
    128129 
    129             if (! PMC_IS_NULL(e->interp)) 
    130                 Parrot_gc_mark_PObj_alive(INTERP, (PObj *)e->interp); 
    131  
    132             if (! PMC_IS_NULL(e->code)) 
    133                 Parrot_gc_mark_PObj_alive(INTERP, (PObj *)e->code); 
    134  
    135130            SUPER(); 
    136131        } 
    137132    } 
  • src/pmc/cpointer.pmc

     
    8484        if (sig) { 
    8585            void *pointer; 
    8686            GET_ATTR_pointer(INTERP, SELF, pointer); 
    87             Parrot_gc_mark_PObj_alive(interp, (PObj *)sig); 
     87            Parrot_gc_mark_STRING_alive(interp, sig); 
    8888 
    8989            if (pointer) { 
    9090                if (Parrot_str_equal(interp, sig, CONST_STRING(interp, "P"))) { 
    9191                    PMC ** const pmc_pointer = (PMC **) pointer; 
    9292                    PARROT_ASSERT(*pmc_pointer); 
    93                     Parrot_gc_mark_PObj_alive(interp, (PObj *) *pmc_pointer); 
     93                    Parrot_gc_mark_PMC_alive(interp, *pmc_pointer); 
    9494                } 
    9595                else if (Parrot_str_equal(interp, sig, CONST_STRING(interp, "S"))) { 
    9696                    STRING ** const str_pointer = (STRING **) pointer; 
    9797                    PARROT_ASSERT(*str_pointer); 
    98                     Parrot_gc_mark_PObj_alive(interp, (PObj *) *str_pointer); 
     98                    Parrot_gc_mark_STRING_alive(interp, *str_pointer); 
    9999                } 
    100100            } 
    101101        } 
  • src/pmc/filehandle.pmc

     
    119119 
    120120    VTABLE void mark() { 
    121121        Parrot_FileHandle_attributes * const data_struct = PARROT_FILEHANDLE(SELF); 
    122         if (data_struct->mode) 
    123             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->mode); 
    124         if (data_struct->filename) 
    125             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->filename); 
    126         if (data_struct->encoding) 
    127             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->encoding); 
     122        Parrot_gc_mark_STRING_alive(interp, data_struct->mode); 
     123        Parrot_gc_mark_STRING_alive(interp, data_struct->filename); 
     124        Parrot_gc_mark_STRING_alive(interp, data_struct->encoding); 
    128125    } 
    129126 
    130127/* 
  • src/pmc/packfileannotations.pmc

     
    7272        Parrot_PackfileAnnotations_attributes * attrs = 
    7373                PARROT_PACKFILEANNOTATIONS(SELF); 
    7474 
    75         if (!PMC_IS_NULL(attrs->const_table)) 
    76             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->const_table); 
     75        Parrot_gc_mark_PMC_alive(interp, attrs->const_table); 
     76        Parrot_gc_mark_PMC_alive(interp, attrs->annotations); 
    7777 
    78         if (!PMC_IS_NULL(attrs->annotations)) 
    79             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->annotations); 
    80  
    8178        SUPER(); 
    8279    } 
    8380 
  • src/pmc/exception.pmc

     
    149149 
    150150    VTABLE void mark() { 
    151151        Parrot_Exception_attributes * const core_struct = PARROT_EXCEPTION(SELF); 
    152         if (core_struct->message) 
    153             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->message); 
    154         if (core_struct->payload) 
    155             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->payload); 
    156         if (core_struct->resume) 
    157             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->resume); 
    158         if (core_struct->backtrace) 
    159             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->backtrace); 
    160         if (core_struct->handler_iter) 
    161             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->handler_iter); 
    162         if (core_struct->handler_ctx) 
    163             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->handler_ctx); 
    164         if (core_struct->thrower) 
    165             Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->thrower); 
     152        Parrot_gc_mark_STRING_alive(interp, core_struct->message); 
     153        Parrot_gc_mark_PMC_alive(interp, core_struct->payload); 
     154        Parrot_gc_mark_PMC_alive(interp, core_struct->resume); 
     155        Parrot_gc_mark_PMC_alive(interp, core_struct->backtrace); 
     156        Parrot_gc_mark_PMC_alive(interp, core_struct->handler_iter); 
     157        Parrot_gc_mark_PMC_alive(interp, core_struct->handler_ctx); 
     158        Parrot_gc_mark_PMC_alive(interp, core_struct->thrower); 
    166159    } 
    167160 
    168161/* 
  • src/pmc/task.pmc

     
    375375        if (PARROT_TASK(SELF)) { 
    376376            Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF); 
    377377 
    378             if (core_struct->codeblock) 
    379                 Parrot_gc_mark_PObj_alive(interp, (PObj*)core_struct->codeblock); 
    380             if (core_struct->data) 
    381                 Parrot_gc_mark_PObj_alive(interp, (PObj*)core_struct->data); 
     378            Parrot_gc_mark_STRING_alive(interp, core_struct->type); 
     379            Parrot_gc_mark_STRING_alive(interp, core_struct->subtype); 
     380            Parrot_gc_mark_STRING_alive(interp, core_struct->status); 
     381            Parrot_gc_mark_PMC_alive(interp, core_struct->codeblock); 
     382            Parrot_gc_mark_PMC_alive(interp, core_struct->data); 
    382383        } 
    383384    } 
    384385 
  • src/pmc/orderedhashiterator.pmc

     
    6565 
    6666    VTABLE void mark() { 
    6767        PMC * const hash = PARROT_ORDEREDHASHITERATOR(SELF)->pmc_hash; 
    68         if (hash) 
    69              Parrot_gc_mark_PObj_alive(INTERP, (PObj *)hash); 
     68        Parrot_gc_mark_PMC_alive(INTERP, hash); 
    7069    } 
    7170 
    7271/* 
  • src/pmc/continuation.pmc

     
    131131        if (!cc) 
    132132            return; 
    133133 
    134         if (cc->to_ctx) 
    135             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) cc->to_ctx); 
    136         if (cc->from_ctx) 
    137             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) cc->from_ctx); 
     134        Parrot_gc_mark_PMC_alive(INTERP, cc->to_ctx); 
     135        Parrot_gc_mark_PMC_alive(INTERP, cc->from_ctx); 
    138136    } 
    139137 
    140138/* 
  • src/pmc/packfile.pmc

     
    9595    VTABLE void mark() { 
    9696        Parrot_Packfile_attributes * attrs = PARROT_PACKFILE(SELF); 
    9797 
    98         if (attrs->uuid) 
    99             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)attrs->uuid); 
    100         if (!PMC_IS_NULL(attrs->directory)) 
    101             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)attrs->directory); 
     98        Parrot_gc_mark_STRING_alive(INTERP, attrs->uuid); 
     99        Parrot_gc_mark_PMC_alive(INTERP, attrs->directory); 
    102100    } 
    103101/* 
    104102 
  • src/pmc/stringiterator.pmc

     
    5959    VTABLE void mark() { 
    6060        PMC *string; 
    6161        GET_ATTR_string(INTERP, SELF, string); 
    62         if (string) 
    63              Parrot_gc_mark_PObj_alive(INTERP, (PObj *)string); 
     62        Parrot_gc_mark_PMC_alive(INTERP, string); 
    6463    } 
    6564 
    6665/* 
  • src/pmc/socket.pmc

     
    9494        Parrot_Socket_attributes * const data = PARROT_SOCKET(SELF); 
    9595 
    9696        if (data) { 
    97             if (data->local) 
    98                 Parrot_gc_mark_PObj_alive(interp, (PObj *)data->local); 
    99  
    100             if (data->remote) 
    101                 Parrot_gc_mark_PObj_alive(interp, (PObj *)data->remote); 
     97            Parrot_gc_mark_PMC_alive(interp, data->local); 
     98            Parrot_gc_mark_PMC_alive(interp, data->remote); 
    10299        } 
    103100    } 
    104101/* 
  • src/pmc/hashiterator.pmc

     
    126126 
    127127    VTABLE void mark() { 
    128128        PMC *hash = PARROT_HASHITERATOR(SELF)->pmc_hash; 
    129         if (hash) 
    130              Parrot_gc_mark_PObj_alive(INTERP, (PObj *)hash); 
     129        Parrot_gc_mark_PMC_alive(INTERP, hash); 
    131130        /* We don't mark underlying parrot_hash. Hash PMC will mark it */ 
    132131    } 
    133132 
  • src/pmc/fixedpmcarray.pmc

     
    787787            return; 
    788788 
    789789        for (i = PMC_size(SELF) - 1; i >= 0; --i) 
    790             if (data[i]) 
    791                 Parrot_gc_mark_PObj_alive(interp, (PObj *)data[i]); 
     790            Parrot_gc_mark_PMC_alive(interp, data[i]); 
    792791    } 
    793792 
    794793 
  • src/pmc/packfileconstanttable.pmc

     
    6666        Parrot_PackfileConstantTable_attributes * attrs = 
    6767                PARROT_PACKFILECONSTANTTABLE(SELF); 
    6868 
    69         if (!PMC_IS_NULL(attrs->constants)) 
    70             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->constants); 
    71         if (!PMC_IS_NULL(attrs->types)) 
    72             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->types); 
     69        Parrot_gc_mark_PMC_alive(interp, attrs->constants); 
     70        Parrot_gc_mark_PMC_alive(interp, attrs->types); 
    7371 
    7472        SUPER(); 
    7573    } 
  • src/pmc/unmanagedstruct.pmc

     
    739739*/ 
    740740 
    741741    VTABLE void mark() { 
    742         if (PARROT_UNMANAGEDSTRUCT(SELF)->init) 
    743             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)PARROT_UNMANAGEDSTRUCT(SELF)->init); 
     742        PMC *init = PARROT_UNMANAGEDSTRUCT(SELF)->init; 
     743        Parrot_gc_mark_PMC_alive(INTERP, init); 
    744744    } 
    745745 
    746746/* 
  • src/pmc/packfilerawsegment.pmc

     
    6464        Parrot_PackfileRawSegment_attributes * attrs = 
    6565                PARROT_PACKFILERAWSEGMENT(SELF); 
    6666 
    67         if (!PMC_IS_NULL(attrs->opcodes)) 
    68             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->opcodes); 
     67        Parrot_gc_mark_PMC_alive(interp, attrs->opcodes); 
    6968 
    7069        SUPER(); 
    7170    } 
  • src/pmc/packfilefixupentry.pmc

     
    5757        Parrot_PackfileFixupEntry_attributes * attrs = 
    5858                PARROT_PACKFILEFIXUPENTRY(SELF); 
    5959 
    60         if (attrs->name) 
    61             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->name); 
     60        Parrot_gc_mark_STRING_alive(interp, attrs->name); 
    6261    } 
    6362 
    6463/* 
  • src/pmc/scheduler.pmc

     
    266266        if (PARROT_SCHEDULER(SELF)) { 
    267267            Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF); 
    268268 
    269             if (core_struct->task_list) 
    270                 Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->task_list); 
    271             if (core_struct->task_index) 
    272                 Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->task_index); 
    273             if (core_struct->wait_index) 
    274                 Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->wait_index); 
    275             if (core_struct->handlers) 
    276                 Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->handlers); 
    277             if (core_struct->messages) 
    278                 Parrot_gc_mark_PObj_alive(interp, (PObj *)core_struct->messages); 
     269            Parrot_gc_mark_PMC_alive(interp, core_struct->task_list); 
     270            Parrot_gc_mark_PMC_alive(interp, core_struct->task_index); 
     271            Parrot_gc_mark_PMC_alive(interp, core_struct->wait_index); 
     272            Parrot_gc_mark_PMC_alive(interp, core_struct->handlers); 
     273            Parrot_gc_mark_PMC_alive(interp, core_struct->messages); 
    279274        } 
    280275    } 
    281276 
  • src/pmc/exceptionhandler.pmc

     
    6868    VTABLE void mark() { 
    6969        Parrot_ExceptionHandler_attributes * const attrs = 
    7070            PARROT_EXCEPTIONHANDLER(SELF); 
    71         if (attrs->handled_types) 
    72             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->handled_types); 
    73         if (attrs->handled_types_except) 
    74             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->handled_types_except); 
     71        Parrot_gc_mark_PMC_alive(interp, attrs->handled_types); 
     72        Parrot_gc_mark_PMC_alive(interp, attrs->handled_types_except); 
    7573        SUPER(); 
    7674    } 
    7775 
  • src/pmc/namespace.pmc

     
    162162    VTABLE void mark() { 
    163163        Parrot_NameSpace_attributes * const nsinfo = PARROT_NAMESPACE(SELF); 
    164164        SUPER(); 
    165         if (nsinfo->parent) 
    166             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)nsinfo->parent); 
    167         if (nsinfo->name) 
    168             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)nsinfo->name); 
    169         if (nsinfo->_class) 
    170             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)nsinfo->_class); 
    171         if (nsinfo->vtable) 
    172             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)nsinfo->vtable); 
    173         if (nsinfo->methods) 
    174             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)nsinfo->methods); 
     165        Parrot_gc_mark_PMC_alive(INTERP, nsinfo->parent); 
     166        Parrot_gc_mark_STRING_alive(INTERP, nsinfo->name); 
     167        Parrot_gc_mark_PMC_alive(INTERP, nsinfo->_class); 
     168        Parrot_gc_mark_PMC_alive(INTERP, nsinfo->vtable); 
     169        Parrot_gc_mark_PMC_alive(INTERP, nsinfo->methods); 
    175170    } 
    176171 
    177172/* 
  • src/pmc/packfiledirectory.pmc

     
    6161        Parrot_PackfileDirectory_attributes * attrs = 
    6262                PARROT_PACKFILEDIRECTORY(SELF); 
    6363 
    64         if (!PMC_IS_NULL(attrs->hash)) 
    65             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->hash); 
     64        Parrot_gc_mark_PMC_alive(interp, attrs->hash); 
    6665 
    6766        SUPER(); 
    6867    } 
  • src/pmc/nci.pmc

     
    232232        if (PARROT_NCI(SELF)) { 
    233233            Parrot_NCI_attributes * const nci_info = PARROT_NCI(SELF); 
    234234 
    235             if (nci_info->signature) 
    236                 Parrot_gc_mark_PObj_alive(interp, (PObj*)nci_info->signature); 
    237             if (nci_info->pcc_params_signature) 
    238                 Parrot_gc_mark_PObj_alive(interp, (PObj*)nci_info->pcc_params_signature); 
    239             if (nci_info->long_signature) 
    240                 Parrot_gc_mark_PObj_alive(interp, (PObj*)nci_info->long_signature); 
    241             if (nci_info->multi_sig) 
    242                 Parrot_gc_mark_PObj_alive(interp, (PObj*)nci_info->multi_sig); 
     235            Parrot_gc_mark_STRING_alive(interp, nci_info->signature); 
     236            Parrot_gc_mark_STRING_alive(interp, nci_info->pcc_params_signature); 
     237            Parrot_gc_mark_STRING_alive(interp, nci_info->long_signature); 
     238            Parrot_gc_mark_PMC_alive(interp, nci_info->multi_sig); 
    243239        } 
    244240    } 
    245241 
  • src/pmc/packfileannotation.pmc

     
    6060        Parrot_PackfileAnnotation_attributes * attrs = 
    6161                PARROT_PACKFILEANNOTATION(SELF); 
    6262 
    63         if (attrs->name) 
    64             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->name); 
    65         if ((attrs->value_type == PF_ANNOTATION_KEY_TYPE_STR) && attrs->str_value) 
    66             Parrot_gc_mark_PObj_alive(interp, (PObj *)attrs->str_value); 
     63        Parrot_gc_mark_STRING_alive(interp, attrs->name); 
     64        Parrot_gc_mark_STRING_alive(interp, attrs->str_value); 
    6765    } 
    6866 
    6967 
  • src/pmc/stringhandle.pmc

     
    120120 
    121121    VTABLE void mark() { 
    122122        Parrot_StringHandle_attributes * const data_struct = PARROT_STRINGHANDLE(SELF); 
    123         if (data_struct->stringhandle) 
    124             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->stringhandle); 
    125         if (data_struct->mode) 
    126             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->mode); 
    127         if (data_struct->encoding) 
    128             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->encoding); 
    129         if (data_struct->filename) 
    130             Parrot_gc_mark_PObj_alive(interp, (PObj *)data_struct->filename); 
     123        Parrot_gc_mark_STRING_alive(interp, data_struct->stringhandle); 
     124        Parrot_gc_mark_STRING_alive(interp, data_struct->mode); 
     125        Parrot_gc_mark_STRING_alive(interp, data_struct->encoding); 
     126        Parrot_gc_mark_STRING_alive(interp, data_struct->filename); 
    131127    } 
    132128 
    133129/* 
  • src/pmc/schedulermessage.pmc

     
    199199            Parrot_SchedulerMessage_attributes * const core_struct = 
    200200                PARROT_SCHEDULERMESSAGE(SELF); 
    201201 
    202             if (core_struct->data) 
    203                 Parrot_gc_mark_PObj_alive(interp, (PObj*)core_struct->data); 
     202            Parrot_gc_mark_STRING_alive(interp, core_struct->type); 
     203            Parrot_gc_mark_PMC_alive(interp, core_struct->data); 
    204204        } 
    205205    } 
    206206 
  • src/pmc/fixedstringarray.pmc

     
    118118            GET_ATTR_size(INTERP, SELF, size); 
    119119 
    120120            for (i = 0; i < size; i++) { 
    121                 if (str_array[i]) 
    122                     Parrot_gc_mark_PObj_alive(INTERP, (PObj *) str_array[i]); 
     121                Parrot_gc_mark_STRING_alive(INTERP, str_array[i]); 
    123122            } 
    124123        } 
    125124    } 
  • src/pmc/eval.pmc

     
    119119            opcode_t  ci  = e->offset; 
    120120            PMC      *sub = ct->constants[ci]->u.key; 
    121121 
    122             if (!PMC_IS_NULL(sub)) 
    123                 Parrot_gc_mark_PObj_alive(interp, (PObj *)sub); 
     122            Parrot_gc_mark_PMC_alive(interp, sub); 
    124123        } 
    125124    } 
    126125} 
  • src/pmc/arrayiterator.pmc

     
    109109    VTABLE void mark() { 
    110110        PMC *array; 
    111111        GET_ATTR_array(INTERP, SELF, array); 
    112         if (array) 
    113              Parrot_gc_mark_PObj_alive(INTERP, (PObj *)array); 
     112        Parrot_gc_mark_PMC_alive(INTERP, array); 
    114113    } 
    115114 
    116115/* 
  • src/pmc/sub.pmc

     
    571571        if (!sub) 
    572572            return; 
    573573 
    574         if (sub->name) 
    575             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->name); 
    576         if (sub->method_name) 
    577             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->method_name); 
    578         if (sub->ns_entry_name) 
    579             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->ns_entry_name); 
    580         if (!PMC_IS_NULL(sub->namespace_name)) 
    581             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->namespace_name); 
    582         if (!PMC_IS_NULL(sub->namespace_stash)) 
    583             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->namespace_stash); 
    584         if (!PMC_IS_NULL(sub->multi_signature)) 
    585             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->multi_signature); 
    586         if (!PMC_IS_NULL(sub->lex_info)) 
    587             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->lex_info); 
    588         if (!PMC_IS_NULL(sub->outer_sub)) 
    589             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->outer_sub); 
    590         if (!PMC_IS_NULL(sub->eval_pmc)) 
    591             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->eval_pmc); 
    592         if (sub->subid) 
    593             Parrot_gc_mark_PObj_alive(INTERP, (PObj *) sub->subid); 
    594         if (sub->ctx) 
    595             Parrot_gc_mark_PObj_alive(interp, (PObj *) sub->ctx); 
    596         if (sub->outer_ctx) 
    597             Parrot_gc_mark_PObj_alive(interp, (PObj *) sub->outer_ctx); 
     574        Parrot_gc_mark_STRING_alive(INTERP, sub->name); 
     575        Parrot_gc_mark_STRING_alive(INTERP, sub->method_name); 
     576        Parrot_gc_mark_STRING_alive(INTERP, sub->ns_entry_name); 
     577        Parrot_gc_mark_PMC_alive(INTERP, sub->namespace_name); 
     578        Parrot_gc_mark_PMC_alive(INTERP, sub->namespace_stash); 
     579        Parrot_gc_mark_PMC_alive(INTERP, sub->multi_signature); 
     580        Parrot_gc_mark_PMC_alive(INTERP, sub->lex_info); 
     581        Parrot_gc_mark_PMC_alive(INTERP, sub->outer_sub); 
     582        Parrot_gc_mark_PMC_alive(INTERP, sub->eval_pmc); 
     583        Parrot_gc_mark_STRING_alive(INTERP, sub->subid); 
     584        Parrot_gc_mark_PMC_alive(interp, sub->ctx); 
     585        Parrot_gc_mark_PMC_alive(interp, sub->outer_ctx); 
    598586    } 
    599587 
    600588/* 
  • src/pmc/callsignature.pmc

     
    179179        Parrot_CallSignature_attributes * const attrs = PARROT_CALLSIGNATURE(SELF); 
    180180 
    181181        if (attrs) { 
    182             if (attrs->returns) 
    183                 Parrot_gc_mark_PObj_alive(interp, (PObj*)attrs->returns); 
    184             if (attrs->type_tuple) 
    185                 Parrot_gc_mark_PObj_alive(interp, (PObj*)attrs->type_tuple); 
    186             if (attrs->short_sig) 
    187                 Parrot_gc_mark_PObj_alive(interp, (PObj*)attrs->short_sig); 
     182            Parrot_gc_mark_PMC_alive(interp, attrs->returns); 
     183            Parrot_gc_mark_PMC_alive(interp, attrs->type_tuple); 
     184            Parrot_gc_mark_STRING_alive(interp, attrs->short_sig); 
    188185        } 
    189186        SUPER(); 
    190187    } 
  • src/gc/api.c

     
    236236 
    237237/* 
    238238 
     239=item C<void Parrot_gc_mark_PMC_alive_fun(PARROT_INTERP, PMC *obj)> 
     240 
     241A type safe wrapper of Parrot_gc_mark_PObj_alive for PMC. 
     242 
     243=cut 
     244 
     245*/ 
     246 
     247PARROT_EXPORT 
     248void 
     249Parrot_gc_mark_PMC_alive_fun(PARROT_INTERP, ARGMOD_NULLOK(PMC *obj)) 
     250{ 
     251    ASSERT_ARGS(Parrot_gc_mark_PMC_alive_fun) 
     252    if (!PMC_IS_NULL(obj)) { 
     253        PARROT_ASSERT(PObj_is_PMC_TEST(obj)); 
     254        Parrot_gc_mark_PObj_alive(interp, (PObj *)obj); 
     255    } 
     256} 
     257 
     258/* 
     259 
     260=item C<void Parrot_gc_mark_STRING_alive_fun(PARROT_INTERP, STRING *obj)> 
     261 
     262A type safe wrapper of Parrot_gc_mark_PObj_alive for STRING. 
     263 
     264=cut 
     265 
     266*/ 
     267 
     268PARROT_EXPORT 
     269void 
     270Parrot_gc_mark_STRING_alive_fun(PARROT_INTERP, ARGMOD_NULLOK(STRING *obj)) 
     271{ 
     272    ASSERT_ARGS(Parrot_gc_mark_STRING_alive_fun) 
     273    if (!STRING_IS_NULL(obj)) { 
     274        PARROT_ASSERT(PObj_is_string_TEST(obj)); 
     275        Parrot_gc_mark_PObj_alive(interp, (PObj *)obj); 
     276    } 
     277} 
     278 
     279/* 
     280 
    239281=item C<void Parrot_gc_initialize(PARROT_INTERP, void *stacktop)> 
    240282 
    241283Initializes the memory allocator and the garbage collection subsystem. 
  • include/parrot/gc_api.h

     
    112112        __attribute__nonnull__(1); 
    113113 
    114114PARROT_EXPORT 
     115void Parrot_gc_mark_PMC_alive_fun(PARROT_INTERP, ARGMOD_NULLOK(PMC *obj)) 
     116        __attribute__nonnull__(1) 
     117        FUNC_MODIFIES(*obj); 
     118 
     119PARROT_EXPORT 
    115120void Parrot_gc_mark_PObj_alive(PARROT_INTERP, ARGMOD(PObj *obj)) 
    116121        __attribute__nonnull__(1) 
    117122        __attribute__nonnull__(2) 
    118123        FUNC_MODIFIES(*obj); 
    119124 
    120125PARROT_EXPORT 
     126void Parrot_gc_mark_STRING_alive_fun(PARROT_INTERP, 
     127    ARGMOD_NULLOK(STRING *obj)) 
     128        __attribute__nonnull__(1) 
     129        FUNC_MODIFIES(*obj); 
     130 
     131PARROT_EXPORT 
    121132unsigned int Parrot_is_blocked_GC_mark(PARROT_INTERP) 
    122133        __attribute__nonnull__(1); 
    123134 
     
    315326       PARROT_ASSERT_ARG(interp) 
    316327#define ASSERT_ARGS_Parrot_block_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \ 
    317328       PARROT_ASSERT_ARG(interp) 
     329#define ASSERT_ARGS_Parrot_gc_mark_PMC_alive_fun __attribute__unused__ int _ASSERT_ARGS_CHECK = \ 
     330       PARROT_ASSERT_ARG(interp) 
    318331#define ASSERT_ARGS_Parrot_gc_mark_PObj_alive __attribute__unused__ int _ASSERT_ARGS_CHECK = \ 
    319332       PARROT_ASSERT_ARG(interp) \ 
    320333    && PARROT_ASSERT_ARG(obj) 
     334#define ASSERT_ARGS_Parrot_gc_mark_STRING_alive_fun \ 
     335     __attribute__unused__ int _ASSERT_ARGS_CHECK = \ 
     336       PARROT_ASSERT_ARG(interp) 
    321337#define ASSERT_ARGS_Parrot_is_blocked_GC_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = \ 
    322338       PARROT_ASSERT_ARG(interp) 
    323339#define ASSERT_ARGS_Parrot_is_blocked_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \ 
     
    448464 
    449465void Parrot_gc_inf_init(PARROT_INTERP); 
    450466 
     467#ifdef NDEBUG 
     468#  define Parrot_gc_mark_PMC_alive(interp, obj) \ 
     469        do if (! PMC_IS_NULL(obj)) Parrot_gc_mark_PObj_alive((interp), (PObj *)(obj)); while (0) 
     470#  define Parrot_gc_mark_STRING_alive(interp, obj) \ 
     471        do if (! STRING_IS_NULL(obj)) Parrot_gc_mark_PObj_alive((interp), (PObj *)(obj)); while (0) 
     472#else 
     473#  define Parrot_gc_mark_PMC_alive(interp, obj) Parrot_gc_mark_PMC_alive_fun((interp), (obj)) 
     474#  define Parrot_gc_mark_STRING_alive(interp, obj) Parrot_gc_mark_STRING_alive_fun((interp), (obj)) 
     475#endif 
     476 
    451477#endif /* PARROT_GC_API_H_GUARD */ 
    452478 
    453479/*