+ genericAddPointer(*it, filter, markHook);
+}
+
+class DummyMarkHook {
+public:
+ void mark(void*) { }
+};
+
+void ConservativeRoots::add(void* begin, void* end)
+{
+ DummyMarkHook dummy;
+ genericAddSpan(begin, end, dummy);
+}
+
+void ConservativeRoots::add(void* begin, void* end, JITStubRoutineSet& jitStubRoutines)
+{
+ genericAddSpan(begin, end, jitStubRoutines);
+}
+
+template<typename T, typename U>
+class CompositeMarkHook {
+public:
+ CompositeMarkHook(T& first, U& second)
+ : m_first(first)
+ , m_second(second)
+ {
+ }
+
+ void mark(void* address)
+ {
+ m_first.mark(address);
+ m_second.mark(address);
+ }
+
+private:
+ T& m_first;
+ U& m_second;
+};
+
+void ConservativeRoots::add(
+ void* begin, void* end, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks)
+{
+ CompositeMarkHook<JITStubRoutineSet, CodeBlockSet> markHook(jitStubRoutines, codeBlocks);
+ genericAddSpan(begin, end, markHook);