petdance/scratch — Issue #524: Pmc2c should generate mark and destroy VTABLES
Author: petdance
Created: 2011-11-14 06:01:05+00:00
State: open
Labels: core, Pri-normal, Sev-medium, todo

Pending discussion today in #ps:
```
Propose adding a PObj flag "PObj_uses_malloc_attrs_FLAG" to automatically deallocate Parrot_*_attribute structures in the GC. Thoughts?
Alternative: smarten Pmc2C such that it automatically generates mark() and destroy() VTABLEs as necessary.
prefer chromatic's solution
```

Pmc2c.pl should be smart enough to:
- automatically generate a mark() vtable to mark all STRING and PMC attrs, unless the user has specifically provided one, and
- automatically generate a destroy() vtable to deallocate the Parrot_*_attributes structure, unless the user has already provided one.

There are lots of good reasons to do this.

Originally http://trac.parrot.org/parrot/ticket/709