mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-08 01:39:31 +01:00
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 -
|
||
|---|---|---|
| .. | ||
| aasmcpu.pas | ||
| agjasmin.pas | ||
| aoptcpu.pas | ||
| aoptcpub.pas | ||
| aoptcpud.pas | ||
| cgcpu.pas | ||
| cpubase.pas | ||
| cpuinfo.pas | ||
| cpunode.pas | ||
| cpupara.pas | ||
| cpupi.pas | ||
| cputarg.pas | ||
| dbgjasm.pas | ||
| hlcgcpu.pas | ||
| itcpujas.pas | ||
| jvmdef.pas | ||
| jvmreg.dat | ||
| njvmadd.pas | ||
| njvmcal.pas | ||
| njvmcnv.pas | ||
| njvmcon.pas | ||
| njvmflw.pas | ||
| njvminl.pas | ||
| njvmld.pas | ||
| njvmmat.pas | ||
| njvmmem.pas | ||
| njvmset.pas | ||
| njvmtcon.pas | ||
| njvmutil.pas | ||
| njvmvmt.pas | ||
| pjvm.pas | ||
| rgcpu.pas | ||
| rjvmcon.inc | ||
| rjvmnor.inc | ||
| rjvmnum.inc | ||
| rjvmrni.inc | ||
| rjvmsri.inc | ||
| rjvmstd.inc | ||
| rjvmsup.inc | ||
| symcpu.pas | ||
| tgcpu.pas | ||