* Added the tprocdef.parentfpsym property. Set parentfpsym.varstate to vs_read instead of using the pio_needs_parentfp flag.
* Replaced tcgcallparanode.push_zero_sized_value_para by tparamanager.has_strict_proc_signature.
git-svn-id: trunk@45454 -
- Do not remove the $parentfp parameter as was done in the previous optimization approach. Instead when $parentfp is unused to the following:
- On the caller side: Omit passing the value for $parentfp for targets where tcgcallparanode.push_zero_sized_value_para=false (classic CPU targets).
Pass 0/nil as $parentfp for targets where tcgcallparanode.push_zero_sized_value_para=true;
- On the callee side: Prevent allocation of registers/resources for $parentfp.
- When possible keep $parentfp in a register.
- Set the pio_nested_access flag in tprocinfo.set_needs_parentfp() to properly handle deep nesting levels;
git-svn-id: trunk@45436 -
tcgvecnode.pass_generate_code. This avoids a meaningless conversion to 32-bit
(and using the cwd instruction) on i8086 in the far data memory models.
git-svn-id: trunk@39472 -
so that they can still be freed after the reference has been changed
(e.g. in case of array indexing or record field accesses) (mantis #33628)
git-svn-id: trunk@38814 -
o separate information for reading and writing, because e.g. in a
try-block, only the writes to local variables and parameters are
volatile (they have to be committed immediately in case the next
instruction causes an exception)
o for now, only references to absolute memory addresses are marked
as volatile
o the volatily information is (should be) properly maintained throughout
all code generators for all archictures with this patch
o no optimizers or other compiler infrastructure uses the volatility
information yet
o this functionality is not (yet) exposed at the language level, it
is only for internal code generator use right now
git-svn-id: trunk@34996 -
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 -
it was AT_NONE, which is invalid and should never be used
* explicitly pass the correct value for all calls to those methods elsewhere
in the compiler
git-svn-id: trunk@34250 -
generator to the typecheck pass, so that it also works for platforms
that use the parentfpstruct way to handle accesses to nested frames
in case the array has been migrated to such a parentfpstruct
o additionally, the number of comparisons for such range checks
has been reduced from 3 (for signed indices) or 2 (for unsigned
indices) to 1 in all cases
o the range checking code is disabled for the JVM target, as the
JVM automatically range checks all array accesses itself anyway
git-svn-id: trunk@34034 -
all of their values, when kept in a bitpacked array, properly via
pass_typecheck rather than hacking location.size in pass_generate_code:
o the old fix was incomplete (it didn't handle non-constant indices)
o the old fix didn't work for llvm (since it uses defs rather than
location.size)
git-svn-id: trunk@33943 -
Note: the merged code has been adjusted to a) use the typed constant builder and b) to not use the indirect symbol when its not necessary (non-Windows or same unit)
Merged revision(s) 28340, 28350 from branches/svenbarth/packages:
Generate an indirect VMT symbol for each generated VMT.
ncgvmt.pas, TVMTWriter:
* writevmt: write a symbol with the indirect VMT name that references the direct VMT symbol
........
Load the VMT using the indirect symbol if the target supports packages.
ncgmem.pas, tcgloadvmtaddrnode:
* pass_generate_code: if tf_supports_packages is set in target_info.flags we load the VMT using the indirect symbol, otherwise we load it using the direct symbol
........
git-svn-id: trunk@33448 -
labels of LOC_JUMP in the node's location. This generates some extra jumps
for short circuit boolean and/or-expressions if optimizations are off, but
with optimisations enabled the generated code is the same (except for JVM
because the jump threading optimisation isn't enabled there yet).
git-svn-id: trunk@31431 -
type-safe way (for LLVM, and also internal consistency checking between
the VMT as generated in nobj.pas and ncgvmt.pas)
o also converted the VMT validity checking to the node level
git-svn-id: trunk@30950 -