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 -
index of the corresponding llvm fieldvar, as this index is a member
of the fieldvarsym that only gets initialised once the llvm shadow
symtable gets built, which in turn is triggered by trying to access
it for the first time -> if fieldvarsym.llvmfieldnr got loaded by
the compiler before evaluating the llvmst expression and if the
llvmst hadn't been built yet, this llvmfieldnr was not yet initialized
git-svn-id: trunk@31060 -
case a record contains an internal typed constant of its own type
(which happened becuase such a typed constant is also fieldvarsym, solved
by checking for sp_static) (mantis #27880)
* fixed several other similar cases in the compiler where we are only
interested in instance fields, but processed all fieldvarsyms
git-svn-id: trunk@30614 -
(abstract)recordsymtables, so that these settings don't depend on the
current user settings when internally creating record definitions
git-svn-id: branches/hlcgllvm@30343 -
types until it finds a non-aggregate type, and then returns "true" if
that aggregate (record or array) contains one element
* it now also returns the type of that element directly rather than a
tfieldvarsym, since we only care about the type and in case of an array
there is no field
git-svn-id: trunk@30205 -
an Objective-C method masks an identifier from a category, because due
to the fact that all standard categories are imported at the same time via
the CocoaAll unit, this can often happen with categories you don't know/
care about. These errors also didn't happen in 2.6.x
git-svn-id: trunk@29497 -
symtable.pas, is_visible_for_object:
* if the symtable belongs to a specialization we need to ignore any owning local- or parasymtable as well to determine which unit it belongs to
+ added test
git-svn-id: trunk@29482 -
there is no field at that exact offset, so we can also use it to find the
next field in case there is alignment padding
git-svn-id: branches/hlcgllvm@28754 -
symtable.pas, searchsym_in_helper:
* check whether extendeddef is assigned as this function is called when parsing the extended type and it was not found (the second pass is to display a more accurate error message and was added some weeks ago)
+ added test
git-svn-id: trunk@28242 -
"reference to ...; cdecl;". The "reference to ..." syntax is what Delphi
uses for anonymous function references. The "cdecl;" indicates that this
is for the C-variant of such references, which is what blocks are
git-svn-id: branches/blocks@28233 -
cgmessage won't do anything in case cgerror is already set (and in several
places we assume that the compiler will immediately abort after throwing a
fatal error)
git-svn-id: trunk@28229 -
symtable.pas, search_objectpascal_helper:
* handle more symbol types than just properties and methods; afterall helpers can have types, static variables and constants as well
+ added test
git-svn-id: trunk@27534 -
o made all (non-abstract) tdef and tsym constructors virtual
o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
class
o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
class from the base classes, and initialises the c*def/c*sym classes with
them. This is done so that the llvm target will be able to derive from
the tcpu*def/sym classes without umpteen ifdefs, and it also means that
the WPO can devirtualise everything because the c* variables are only
initialised with one class type
o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
calls
git-svn-id: trunk@27361 -
don't generate imports for nested routines in the llvm code generator,
as we check whether we have to do this based on whether or not the
procdef's owner is in the current unit (and that owner is a localsymtable
in case of a nested routine)
o nested calls now work with the llvm code generator
git-svn-id: branches/hlcgllvm@27139 -
that contains their mapping to LLVM (mainly getting rid of variant parts
and adding explicit padding when not using {$packrecords c})
git-svn-id: branches/hlcgllvm@26988 -