Open Bug 1032330 Opened 11 years ago Updated 3 years ago

Make it easier to create new GC kinds

Categories

(Core :: JavaScript: GC, defect)

defect

Tracking

()

flash10

People

(Reporter: terrence, Unassigned)

References

(Blocks 1 open bug)

Details

Creating a new GC think kind is incredibly difficult at the moment: it requires touching random stuff all over the system and detailed knowledge of GC internals. This has lead on multiple occasions to fantastically over-complicated machinery to re-create the effects of GC management without having to actually touch the GC machinery. This is a bad place to be, since GC management of lifetimes is an incredibly handy utility when implementing a GC'd language.
Reviewing Shu's recent addition of a GC thing for managing bindings, the following places needed to be edited: * js/public/TraceKind.h - forward decl - TraceKind enum - FOR_EACH_TRACE_KIND * js/public/TracingAPI.h - onFooEdge - dispatchToEdge * js/src/gc/Allocator.cpp - checkAllocatorState assertion * js/src/gc/Barrier.cpp - forward decls - GCPtr<Foo> typedef * js/src/gc/GCInternals.h - MovingTracer::onFooEdge * js/src/gc/Heap.h - AllocKind enum - FOR_EACH_ALLOC_KIND * js/src/gc/Marking.* - eagerlyMarkChildren - Foo::trace * js/src/gc/Staticstics.* - PHASE_SWEEP_FOO * js/src/jsgc.h - various tables - MightBeForwarded * js/src/jsgc.cpp - FinalizePhases - allocKindsToRelocate - onFooEdge impl - UpdatePhaseMisc We should be able to expand most of this from one or more simple tables.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.