Ticket #2010 (closed deprecation: fixed)
add write barrier to all PMCs that write in unusual VTABLE functions
| Reported by: | cotto | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Version: | 3.0.0 |
| Severity: | medium | Keywords: | |
| Cc: | Language: | ||
| Patch status: | Platform: |
Description
The new generational gc that bacek's been working on gives us some very nice performance benefits, but it also adds a new requirement to PMCs. src/vtable.tbl lists all known VTABLE function names, some of which are marked with :write. All other VTABLE functions usually don't mutate the state of their PMCs. Call these "non-mutating" VTABLE function.
Any PMC that implements a non-mutating VTABLE function in a way that mutates the PMC's internals now needs to use the PARROT_GC_WRITE_BARRIER macro on any PMCs that are modified, including SELF. This won't mean very many changes for most HLLs, but it can result in mysterious failures if neglected.
There's an implementation of PARROT_GC_WRITE_BARRIER in master now, so it can safely be added to any HLL that builds with the current Parrot without breaking anything.
