+ search_management_operator function to find Tprocdef for selected management operator in record definition
tokens.pas:
+ new constants: first_managment_operator and last_managment_operator used in search_management_operator
git-svn-id: trunk@35444 -
ppu.pas:
* increase ppu version
symconst.pas:
+ new enum tmanagementoperator and set tmanagementoperators
symtable.pas, trecordsymtable:
+ new field managementoperators
+ new method includemanagementoperator
symdef.pas, trecorddef.ppuload and trecorddef.ppuwrite:
* save/load for managementoperators
git-svn-id: trunk@35439 -
* also check the local symtable in that case (a program does not result in a PPU, but we need the imported symbols nevertheless when linking to a package)
git-svn-id: trunk@34414 -
Reset tstoredsymtable.init_final_check_done when a symbol is added or removed as otherwise property getters in a record *before* any managed field would trigger it, thus leading to the record being considered as "non-managed".
git-svn-id: trunk@34088 -
To correctly generate the import library for a package we need to resolve the dangling external symbols of all units. For this each unit now stores which symbols it exported from another unit and it also stores all global and external assembler symbols it has (maybe this can be streamlined later on, but for now this works).
entfile.pas:
+ new entry for the imported unit symbols
fmodule.pas, tmodule:
+ new field unitimportsyms which holds all symbols imported by a unit from another unit
+ new method to add an imported symbol
* create, destroy & reset: correctly instantiate/free the two new lists
fppu.pas, tppumodule:
+ new field unitimportsymsderefs to hold the derefs during loading from/storing to PPU
+ new method buildderefunitimportsyms to generate the derefs for each imported symbol
+ new method derefunitimportsyms to resolve each imported symbol deref
+ new method readunitimportsyms to read the imported symbols from the PPU
+ new method writeunitimportsyms to write all imported symbols to the PPU
* load_implementation: read the imported symbols if their entry is encountered
* writeppu: generate the derefs for the imported symbols and write them to the PPU
* load_usedunits: resolve the imported symbols once all derefs are known
symtable.pas:
* addsymref: if the symbol is not from the current unit than mark it as imported
ppu.pas:
* increase PPU version
-- Diese und die folgenden Zeilen werden ignoriert --
M entfile.pas
M fmodule.pas
M fppu.pas
M ppu.pas
M symtable.pas
git-svn-id: trunk@33492 -
looking for a category, as oo_is_classhelper is also set for Pascal
class helpers (fixes crash caused by the fact that Object Pascal class
helpers don't have childof set, while categories do -- mantis #29666)
git-svn-id: trunk@33193 -
Extract functionality that is shared between the metadata files for units (PPU) and for packages (PCP) into a parent class called tentryfile
+ add new unit entfile which contains the new tentryfile class and related types and constants
* ppu.pas:
- remove methods, fields, types and constants which were moved to entfile.pas
* replace the parts of tppuheader shared with tentryheader by a field of type tentryheader
fppu.pas, pmodules.pas, utils/ppumove.pp, utils/ppuutils/ppudump.pp:
+ add entfile to uses
* adjust access to common header fields
node.pas, symdef.pas, symsym.pas, symtable.pas, wpoinfo.pas, utils/ppufiles.pp:
+ add entfile to uses
........
git-svn-id: trunk@32976 -
than the one we use to construct the LLVM equivalent (which doesn't support
variants), or in case the complete record is not defined in the source and
has to be padded with zeroes
o we do this by creating a new recorddef in this case with as elements the
defs of the actually emitted constant data, and replacing the original
def with this new def; note that this can also replace arrays in case of,
e.g., an array of a variant record type
o the pass in llvmtype takes care of inserting type conversions (bitcasts)
when these constants are accessed using the original def
git-svn-id: trunk@32719 -
o while in principle LLVM can layout those the same as we do, this would
require special treatment in case some fields are not initialised in
a typed record declaration (because then we have to emit padding only
for the skipped fields, and not for any padding between them)
o exception: records we create to represent parameters, as those have to
match the ABI definitions exactly for them to be treated as expected
git-svn-id: trunk@32714 -
tabstractrecordsymtable.has_single_field(), due to always looking in the
symlist of the original record rather than properly recursing into those
of nested ones (mantis #28641)
git-svn-id: trunk@32618 -
* correctly handle the case that a generic method specialized in another unit needs to have access to private/protected members as well
git-svn-id: trunk@32437 -
guaranteed to be set. Instead, temporarily assign fieldoffsets to determine
their order in the sort function (fixes webtbs/tw15415 with -O4 after
r32153)
git-svn-id: trunk@32159 -
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 -