mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 12:10:22 +02:00
The sources of the Free Pascal compiler, RTL, packages and utilities.
See https://www.freepascal.org/ for more info.
![]() the defs and syms (recursively) referred by inline routines and by the WPO info o defs and syms are no longer added immediately to the module's deflist/ symlist, even if they are created as "registered". Instead, "doregister=true" simply means "add it to the symbol table at the top of the symtable stack" o normally only when a sym/def is deref'ed, it gets added to the module symlist/deflist and defid/symid gets a (unique) value o in cases where we use(d) the defid to construct unique names within the current module, you now have to call call the tdef.new unique_id_str() method. If the def was not yet registered, we will reserve room for it in the deflist (to get a unique id), but the defid gets set to a negative value computed from its position in the deflist. Should it have to be written to the ppu file later on, the defid will be modified to the actual position in the deflist. For both values, new unique_id_str() will return the same result so that references to this def before and after actual registrations are the same (needed for the JVM backend, but also a good principle in general) Overall: don't directly use symid/defid anymore to get unique identifiers, but use tdef.new unique_id_str() instead (if necessary, a similar routine for tsym can be added) The result is the ppu file size gets reduced significantly after its big increase as a result of the high level typed constant builder (which creates a lot of defs). The result is even more efficient than before, as other unneeded defs/syms from the localsymtables don't get saved/restored anymore either. git-svn-id: trunk@32153 - |
||
---|---|---|
compiler | ||
ide | ||
installer | ||
packages | ||
rtl | ||
tests | ||
utils | ||
.gitattributes | ||
.gitignore | ||
fpmake_add1.inc | ||
fpmake_proc1.inc | ||
fpmake.pp | ||
Makefile | ||
Makefile.fpc |