--- Merging r42815 through r42817 into '.':
U tests/test/tobjc34.pp
U tests/test/tobjc36.pp
U tests/test/tobjcl2.pp
A tests/test/units/cocoaall
A tests/test/units/cocoaall/tw35994.pp
U compiler/defcmp.pas
U compiler/ncal.pas
C compiler/pdecl.pas
C compiler/symconst.pas
C compiler/utils/ppuutils/ppudump.pp
U compiler/symtable.pas
--- Recording mergeinfo for merge of r42815 through r42817 into '.':
U .
--- Merging r42857 into '.':
G compiler/symtable.pas
--- Recording mergeinfo for merge of r42857 into '.':
G .
git-svn-id: branches/fixes_3_2@42883 -
Merged revision(s) 39948, 39951, 39953 from trunk:
* Fixed interface delegation for aarch64 (tdel1 and tdel2 tests).
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.
........
* Fixed bug #17413 (and the tw17413 test) for aarch64 by adding additional check.
........
* aarch64: Fixed loading of a function result which is returned in 4 32-bit MM registers to 2 64-bit int registers. Bug #30329.
........
git-svn-id: branches/fixes_3_2@40543 -
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 -
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 -
section to the high level typed const builder, and use this functionality
for the resource strings (generating items: todo)
* fixed dead stripping unused resource strings (all string data was put in the
same section since r30342)
git-svn-id: trunk@32394 -
"don't free even if not registered"; use for defs that may not be written
to a ppu file, but that must nevertheless survive the compilation of the
current module
* mark all defs created for para locations as "don't free even if not
registered", because we don't discard and recalculate all para locations
after a module has been compiled (since that's not needed)
o solves issues if the paralocations for a routine in the interface of
unit A are calculated while the implementation of unit B gets
compiled, and a new reusable type is allocated at that point which
is not used anywhere else (after r32160)
git-svn-id: trunk@32235 -
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 -
are the first parameter (as required by llvm)
o ensure that for AArch64, "struct return" the parameter always is the first
parameter, as it needs to be returned in a special register there
git-svn-id: trunk@31676 -
o the result is still not very clean due to the fact that this data
is almost completely unstructured due to variable-length strings
everywhere, which means that
a) we cannot just load recorddefs from the system or typeinfo unit
and use those as templates
b) we cannot easily reuse the recorddefs we create ourselves (except
if the strings have the same length -- this is the reason for all
of the names specified to begin_anonymous_record: to reuse defs
as much as possible rather than creating new ones all the time)
c) we have to add explicitly aligned subrecords everywhere to insert
explicit alignment on platforms that need it
git-svn-id: trunk@31255 -