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 -
procoptions even when it's through an array-of-const parameter
* always call create_varargs_paraloc_info() instead of create_paraloc_info()
in the former case, even when no varargs parameters are specified (because
on some platforms even some non-variadic parameters need to be passed
differently, such as on ARM with gnueabihf)
git-svn-id: trunk@41420 -
o unsetting po_inline while parsing the implementation for various reasons
(interprocedural goto/label, accessing a local in a parent frame,
having nested procedures)
o instead handle this via the pio_inline_not_possible flag
o noreturn can no longer be specified only in the implementation
git-svn-id: trunk@40789 -
o use this to handle non-power-of-two-sized parameters for llvm
o no general support in the parser/code generator, so don't expose
git-svn-id: trunk@40398 -
It was broken by r31676 which did not take in account r29953. As a consequence $self was passed in register x1 instead of x0 when the method result is of a managed type.
This fix enables changing order of the $self and $result parameters only for aarch64 AND llvm combination where it is actually needed.
The issue with interface delegation still exists for aarch64-llvm and need to be fixed separately. Probably by applying llvm-specific workarounds as it was made in r29953 for regular aarch64 targets.
git-svn-id: trunk@39948 -
a) the current record contains a field with non-trivial initialization
b) and of the parents contains such a field (only relevant for objects and classes)
git-svn-id: trunk@39255 -
compiler/ncgrtti.pas
+ write_record_operators procedure which fills simple VMT like table for MO.
* recorddef_rtti save MO (if exists)
* objectdef_rtti_fields save nil pointer/entry for objects rtti (have same RTL parts like for records)
compiler/options.pas
+ new define FPC_HAS_MANAGEMENT_OPERATORS
compiler/symconst.pas
+ new item itp_init_record_operators for tinternaltypeprefix enum
+ new entry '$init_record_operators$' in internaltypeprefixName
rtl/inc/rtti.inc
+ new field RecordOp (pointer to MO VMT table) in TRecordInfoInit
+ new types to handle MO VMT: TRTTIRecordOpVMT, PRTTIRecordOpVMT, TRTTIRecCopyOp, TRTTIRecVarOp
rtl/objpas/typinfo.pp
+ RecordOp field for TRecInitData record
git-svn-id: trunk@35445 -
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 -
* have tkInt64 and tkQWord entries also contain the OrdType field (basically the compiler can now use the same function to generate them only with different type kinds)
+ added test
git-svn-id: trunk@35135 -
refer to these type names when writing the s2o and o2s arrays in the LLVM
assembler writer (otherwise we have to write out the entire definition
of those fields and their subtypes for every access, resulting in a 139MB
cpubase.ll instead of a more reasonable 1.5MB one now)
git-svn-id: trunk@34386 -
it's an automatically generated getter/setter, but a procoption. This
way we no longer have to save/restore the synthetickind procdef field
to/from ppu's. This way we can modify the field also after the interface
has been parsed without affecting the crc (e.g. when creating wrappers
for high level targets for routines that are only declared as "external"
in the implementation)
git-svn-id: trunk@34129 -
methods. Implementing a fully functional g_external_wrapper() for llvm is
quite hard, and the regular wrapper method that calls FPC_ABSTRACTERROR can
in principle be optimized to a plain jump by tail call optimisation on other
targets (to the extent that this matters, because most of them will be
smartlinked away, and the ones that are executed will trigger an exception)
o this means that the synthetic method generation needs to be run for all
objectdefs on all platforms now, rather than only for Java classes
git-svn-id: trunk@34127 -
symconst.pas:
+ new constant suffix_indirect which will be used to denote indirect symbols
aasmbase.pas:
* TAsmsymbind: extend by AB_INDIRECT (which is used to define an indirect symbol) and AB_EXTERNAL_INDIRECT (which is used when an unknown indirect symbol is requested)
* asmsymbindname: adjust for TAsmsymbind changes
+ new constant asmsymbindindirect which is a set of both indirect asm symbol binds
aasmdata.pas, TAsmData:
* DefineAsmSymbolByClass: adjust to correctly declare an indirect symbol (with suffix_indirect) if one of the indirect asm symbol binds is used
* RefAsmSymbol: extend by a boolean parameter which is used to request an indirect symbol (usually AB_EXTERNAL_INDIRECT instead of AB_EXTERNAL)
git-svn-id: trunk@33278 -