Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.
git-svn-id: trunk@42356 -
+ compiler/sysmsym.pas: Do the same for for all tsym constructors.
+ compiler/symtype.pas: Generate internalerror in tcompilerppufile.putderef
if a deref field has index -1, as this means that buildderef was not called
while it should have been called.
+ compiler/symtable.pas: Fix bug report itself by adding an extra local variable
CHANGED to add extra cycles in tstoredsymtable.buildderef_referenced method.
New tests for this bug report: tests/webtbs/tw35139.pp and tests/webtbs/tw35139a.pp
git-svn-id: trunk@41425 -
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
their enum name, instead of number
git-svn-id: trunk@36174 -
always be different from the old location, since we just allocated
the registers for the new one above. Should the old registers ever
be needed again for tai_varloc: rr.old/rr.oldhi contains it
git-svn-id: trunk@34086 -
o avoid having to save and restore the original info
o avoids problems in case determining the regable state depends on variables
that may not have been initialised yet at that point (such as
voidpointertype/voidcodepointertype in case the size of procvardefs needs
to be calculated by the regable-determining code)
git-svn-id: trunk@33179 -
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 -
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 -
don't need a separate field for this
o changed the order in which symid and realname are stored to/loaded from
the ppufile (because tsym.create now initialised tsym.symid, and it's
called from ppuload) -> increased ppu version
git-svn-id: trunk@32031 -
* for now all typesyms are created as registered
Note: an additional parameter instead of an overload is used for ttypesym.create as otherwise both constructors would need to be overridden in potential descendant CPU-specific classes...
git-svn-id: trunk@31591 -
+ add an overload of check_hints() that allows to specify the current file position
* have the previous check_hints() procedure be an inline procedure as it simply calls the new overload
git-svn-id: trunk@31513 -
llvm
* instead, add LLVM-specific name mangling based on the asmsymbol's bind
and typ whenever we write out its name
git-svn-id: branches/hlcgllvm@28166 -