that expects an open array of byte, and use it for all sets
o since all sets need to be typecasted to an array type of the appropriate
size, we'll get a compilation error in case this needs to be done and
that also tells us at the same time that the ppu version will need to
be increased
* enabled {$packset 1} for the compiler, as this is now safe with the above
changes
git-svn-id: trunk@43407 -
* entfile.pas: Differenciate ibsymtableoptions and ibrecsymtableoptions.
* ppu.pas: Increase ppu unit CurrentPPULongVersion value.
* utils/ppuutils/ppudump.pp: Add current_symtable_options variable.
Change readsymtableoptions from procedure to function returning
the new tsymtableoptions.
git-svn-id: trunk@42530 -
handling in cross-configuration with different endianess.
The code has been modified to use the same scheme as the writing of
the other parts of the ppu, i.e. change_endian filed has been
added also to tscannerfile class of scanner unit.
This field is then used to swap values that required endianess
conversion.
* scanner.pas: change_endian filed added to tscannerfile class.
The value of this field is set as the same field in tentryfile class of entfile unit.
Token read and write methods converted to use change_endian field.
* ppu.pas: Increase CurrentPPILongVersion
* utils/ppuutils/ppudump.pp: Remove unneeded FPC_BIG_ENDIAN code
which was needed because tokens were previously written using a
different rule.
git-svn-id: trunk@42527 -
This boolean must only be set to true if TControllerType is not simply (ct_none)
* ppu.pas: Increment CurrentPPULongVersion constant as the above modification
changes the number of fields of the TSettings record that is saved to
PPU in ST_LOADSETTINGS field.
git-svn-id: trunk@42323 -
program/library also with -Clflto, all units compiled with that option
will be linked using their bitcode files and LTO
o compiling with -CLflto will compile all units twice: once for normal
(static or smart) linking, and once for LTO. So the result can be
used both with and without LTO.
git-svn-id: branches/debug_eh@41910 -
* ppu version update
* -Sf might be used only during system unit compilation
* loadsystemunit factored out so the system unit can be loaded earlier than other units to get features set
git-svn-id: trunk@37708 -
* 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 -
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 -
Use new cs_checkpointer_called moduleswitches set element.
Use new uf_checkpointer_called PPU flag (reusing obsolete uf_local_browser flag value)
Emit warning if compiled library/program has any code using checkpointer.
* ppu.pas: New constant: uf_checkpointer_called
* globtype.pas: New constant: cs_checkpointer_called
* fppu.pas: Set uf_checkpointer_called flag if cs_checkpointer_called is set in current_settings.module_switches
* i8086/n8086mem.pas: Include cs_checkpointer_called in current_settings.moduleswitches
* ncgmem.pas: Likewise.
* msg/errore.msg: Add new message saying that -gc and -Ur options are incompatible
Add description to -gc option, saying it is experimental.
Add warning at link time for program/library if checkpointer is used in any unit or main code.
* options.pas: if -gc and -Ur options are used, never enable checkpointer code,
instead output a warning that release is incompatible with -gc option.
* pmodules.pas: proc_program: Check all modules for uf_checkpointer_called flag,
emit a warning if checkpointer is used.
* utils/ppuutils/ppudump.pp: Add code for uf_codepointer_called option.
git-svn-id: trunk@34567 -
This basically revives the globalasmsym entry of the PPU though it feeds to different lists, one for the public (exported) symbols and one for the external (imported) symbols. Also the list of symbols is much smaller as it would be if all symbols would be dumped in there.
git-svn-id: trunk@34174 -
SS=DS. This is currently redundant (whether SS=DS can be derived by the other
i8086 memory model unit flags), but in the future will allow adding extra
memory models, where the SS=DS assumption differs from the current ones.
git-svn-id: trunk@34139 -
Correctly parse the directives DenyPackageUnit and WeakPackageUnit
ppu.pas:
+ add flags uf_packagedeny and uf_packageweak
scandir.pas:
+ new procedure do_moduleflagswitch() which parses a ON/OFF/+/- argument and sets or clears a flag in the current module
+ new procedure dir_denypackageunit which handles DenyPackageUnit
* implement dir_weakpackageunit (and move to the correct location ;) )
* InitScannerDirectives: add dir_denypackageunit handler
........
Respect DenyPackageUnit flag.
pmodules.pas, proc_package:
* check all contained units that are not already part of a package for their uf_package_deny flag and report an error for each that has it set
........
Do not check whether all units are used as by definition all units of a package are considered as used.
pmodules.pas, proc_package:
- remove call to current_module.allunitsused
........
Check whether a unit has been implicitely imported in a package. A unit is considered as implicitely imported if it is not part of a required package nor part of the units listed in the contains section. This note is useful (Delphi even provides a dialog in that case) as a package with implicitely imported units /might/ become incompatible with other packages (e.g. if another package includes that unit uses that package and includes that unit explicitely; of course that is the same as if both package included it explicitely, but with the hint one knows where to look).
pmodules.pas, proc_package:
* while walking the loaded units also check whether any of them not contained in a package was part of the contained units which are the same as the current module's used units
........
Generate CRC for package files
pcp.pas, tpcpfile:
+ new field do_crc which controls CRC generation
+ override putdata() method to generate CRC when data is written
* resetfile: enable do_crc by default
........fppu.pas, tppumodule:
* loadfrompackage: mention if a unit is loaded from a package
........
fpkg.pas, tcontainedunit:
+ new fields offset and size for the PPU data stored inside the PCP
fpcp.pas, tpcppackage:
* readcontainedunits & addunit: correctly initialize offset and size to 0
........
Store the modified PPU files directly inside the PCP and thus get finally rid of the .ppl.ppu files.
entfile.pas:
+ new entry type ibpputable
pkgutil.pas:
* adjust RewritePPU to work on a stream as output instead of a filename
fpcp.pas, tpcppackage:
+ new method writepputable() which writes the offsets and sizes of all contained units (not part of CRC!)
+ new method writeppudata() which rewrites all contained PPUs directly into the PCP after the ibend entry (Note: the data is written 16 Byte aligned to ease viewing of the PCP and its contained PPUs in a hex editor)
+ new method readpputable() which reads the offsets and sizes of all contained units
+ new method getmodulestream() which returns a substream for a contained module
* loadpcp: also call readpputable()
* writepcp: first write an empty pputable, then finish writing all data that requires the put*/write* methods of the pcpfile, then use writeppudata() to write all PPUs and finally write the correct pputable at the original location
fppu.pas, tppumodule:
* loadfrompackage: don't read the PPU from a file if it is contained in a package, but using the new tpcppackage.getmodulestream() and tppumodule.openppustream() methods
pmodules.pas, proc_package:
* don't rewrite the PPUs here
pcp.pas:
* increase CurrentPCPVersion
........
Fix cycling
........
git-svn-id: trunk@33514 -
To correctly generate the import library for a package we need to resolve the dangling external symbols of all units. For this each unit now stores which symbols it exported from another unit and it also stores all global and external assembler symbols it has (maybe this can be streamlined later on, but for now this works).
entfile.pas:
+ new entry for the imported unit symbols
fmodule.pas, tmodule:
+ new field unitimportsyms which holds all symbols imported by a unit from another unit
+ new method to add an imported symbol
* create, destroy & reset: correctly instantiate/free the two new lists
fppu.pas, tppumodule:
+ new field unitimportsymsderefs to hold the derefs during loading from/storing to PPU
+ new method buildderefunitimportsyms to generate the derefs for each imported symbol
+ new method derefunitimportsyms to resolve each imported symbol deref
+ new method readunitimportsyms to read the imported symbols from the PPU
+ new method writeunitimportsyms to write all imported symbols to the PPU
* load_implementation: read the imported symbols if their entry is encountered
* writeppu: generate the derefs for the imported symbols and write them to the PPU
* load_usedunits: resolve the imported symbols once all derefs are known
symtable.pas:
* addsymref: if the symbol is not from the current unit than mark it as imported
ppu.pas:
* increase PPU version
-- Diese und die folgenden Zeilen werden ignoriert --
M entfile.pas
M fmodule.pas
M fppu.pas
M ppu.pas
M symtable.pas
git-svn-id: trunk@33492 -
Extract reading of the PPU/PCP version into tentryfile.
entfile.pas:
+ add new getversion method which uses the pointer returned by getheaderaddr to read the PPU/PCP version
ppu.pas:
- remove GetPPUVersion method
fppu.pas, pmodules.pas, utils/ppufiles.pp, utils/ppumove.pp, utils/ppuutils/ppudump.pp
* replace call to GetPPUVersion by call to getversion
........
git-svn-id: trunk@32980 -
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 -