Version 10 (modified by cotto, 13 years ago)

BigInt is converted


The PMC Union is being deprecated, which means that any instances of PMC_int_val, etc need to disappear. This is a big job with several gotchas.

What Needs to Happen

The following PMCs should be straightforward to convert to ATTRs. If a PMC has a certain macro listed, only convert uses of that macro to ATTRs for the PMC. Other UnionVal macros have depenency issues which are not yet resolvable.

PMCrevision fixed
Continuation (PMC_pmc_val only)
Coroutine (PMC_pmc_val only)
LexPad (PMC_pmc_val only)
ManagedStruct (PMC_int_val only)
MatchRange (PMC_int_val2 only)
NameSpace (PMC_pmc_val only)

Allison  explained in depth how to convert code. Good example code can be found in src/pmc/exporter.pmc .


Because the PMC union struct is part of a PMC's internals, its use is affected by PMC inheritance. The following image shows the dependencies between all *core* PMCs. This does not include PMCs from HLLs. Because of these dependencies, all PMCs in a given dependency tree will have to be updated simultaneously. This only means that all instances of e.g. PMC_struct_val will have to be updated, not all instances of all PMC_x_val.


*Array PMCs need to have their mark VTABLE methods updated to actually mark the elements inside them. src/gc/mark_sweep.c:Parrot_gc_trace_pmc_data() attempts to do this by mucking around with PMC_data_typed(). Once the mark VTABLE methods are updated to do The Right Thing, Parrot_gc_trace_pmc_data() can be deprecated along with the PObj_data_is_PMC_array_FLAG. All arrays should instead be marked with PObj_custom_mark_FLAG to call the proper mark VTABLE methods.

* src/gc/mark_sweep.c also uses PMC_struct_val in two places. This needs to be investigated and the data stored elsewhere. See TT #178.