Emit model implementation as loose methods. (#3006)

This patch introduces the concept of 'loose' methods, which semantically
are methods, but are declared as global functions, and are passed an
explicit 'self' pointer. This enables these methods to be declared
outside the class, only when they are needed, therefore removing the
header dependency. The bulk of the emitted model implementation now uses
loose methods.
This commit is contained in:
Geza Lore
2021-06-13 14:33:11 +01:00
committed by GitHub
parent 18cabc369b
commit 60d5f0e86b
48 changed files with 916 additions and 571 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ void VlWorkerThread::workerLoop() {
if (VL_UNLIKELY(m_exiting.load(std::memory_order_acquire))) break;
if (VL_LIKELY(work.m_fnp)) {
work.m_fnp(work.m_evenCycle, work.m_sym);
work.m_fnp(work.m_selfp, work.m_evenCycle);
work.m_fnp = nullptr;
}
}