From 02a10ec379d427f27f471d489247aa586078354b Mon Sep 17 00:00:00 2001 From: Juan M Gómez Date: Wed, 17 May 2023 10:44:42 +0100 Subject: Cpp Vfunctions draft (#21790) * introduces virtual pragma, modifies proc def, prevents proc decl * marks virtual procs as infix * forward declare vfuncs inside the typedef * adds naked callConv to virtual * virtual proc error if not defined in the same top level scope as the type * first param is now this. extracts genvirtualheaderproc * WIP syntax * supports obj. Removes the need for the prefix * parameter count starts as this. Cleanup * clean up * sem tests * adds integration tests * uses constraint to store the virtual content * introduces genVirtualProcParams --------- Co-authored-by: Andreas Rumpf --- compiler/modulegraphs.nim | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/modulegraphs.nim') diff --git a/compiler/modulegraphs.nim b/compiler/modulegraphs.nim index 5cb6a1c34..de97ced99 100644 --- a/compiler/modulegraphs.nim +++ b/compiler/modulegraphs.nim @@ -79,6 +79,7 @@ type procInstCache*: Table[ItemId, seq[LazyInstantiation]] # A symbol's ItemId. attachedOps*: array[TTypeAttachedOp, Table[ItemId, LazySym]] # Type ID, destructors, etc. methodsPerType*: Table[ItemId, seq[(int, LazySym)]] # Type ID, attached methods + virtualProcsPerType*: Table[ItemId, seq[PSym]] # Type ID, attached virtual procs enumToStringProcs*: Table[ItemId, LazySym] emittedTypeInfo*: Table[string, FileIndex] -- cgit 1.4.1-2-gfad0