PPC platforms that use a TOC can never use a tail call to call a different
routine that potentially accesses globals, as it may use a different TOC and
then the linker must be able to insert an instruction after the branch to
restore the original TOC register value on "return". Even if FPC code itself
does not use the TOC register, it's still required since
1) the linker does not know this, and
2) the FPC code might still be called from other code that does use it
o "unique" class (and interface) type aliases should actually not exist at
all except for overload resolution. All the rest (VMT, UUID, RTTI, ...)
should be taken from the aliased class/interface
o there is one Delphi-incompatibily left after this change, but it shouldn't
matter: tw8180 does not compile if you change the declaration to
"tcl=class(TInterfacedObject,XStr,iinterface)", while Kylix does compile
that. It doesn't really matter though, because in Kylix this actually
adds iinterface twice as implemented interface, so there is no point
in accepting this.
git-svn-id: trunk@46773 -
the module to the current module. This is required in case of -al,
because when writing source lines to the assembly output the input
file position gets changed. Since the wrappers are generated at the
end of a unit's compilation, that's no problem if that input file
belongs to the current unit. It was hardcoded to the unit with id 1
before though, which is the main unit specified on the command line
and that one could be different (fixes compilation of win32 buildrtl
with -al after r37961)
git-svn-id: trunk@37973 -
line number information of the method declaration if it's in the current
unit, and otherwise the first line of the current unit (mantis #14399)
git-svn-id: trunk@37961 -
top of the IOffset: SizeUInt field, because it is sometimes used as a
CodePointer (for etStaticMethodResult and etStaticMethodClass) and sometimes
as a SizeInt and these two types can be of different size in certain i8086
memory models
git-svn-id: trunk@34645 -
symbol is defined
o removed all places where AB_INDIRECT symbols were explicitly generated
o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
o for some symbols an indirect symbol is always required (because they are
dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type
git-svn-id: trunk@34165 -
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
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 -
Previously we had the following approach:
- classes that implemented interfaces had an interface table
- classes that didn't implement an interface, but inherited from a class that did had a Nil entry
- classes that didn't implement any interface (including their parents) had a reference to FPC_EMPTYINTF (this was to optimize lookups)
Now the approach is as follows:
- classes that implement an interface or have a parent that implements an interface have an interface table; if the class itself doesn't implement an interface then the count will be 0
- classes that don't implement an interface at all (neither them nor their parents) have a Nil interface table
This way FPC_EMPTYINTF can be removed without sacrificing at least the optimization for classes without any interface. For classes that have parents with interfaces there will be a small speed penalty due to an additional lookup for the counter.
git-svn-id: trunk@34087 -