mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-15 22:30:36 +01:00
+ support for nested procedural variables:
o activate using {$modeswitch nestedprocvars} (compatible with all
regular syntax modes, enabled by default for MacPas mode)
o activating this mode switch changes the way the frame pointer is
passed to nested routines into the same way that Delphi uses (always
passed via the stack, and if necessary removed from the stack by
the caller) -- Todo: possibly also allow using this parameter
passing convention without enabling nested procvars, maybe even
by default in Delphi mode, see mantis #9432
o both global and nested routines can be passed to/assigned to a
nested procvar (and called via them). Note that converting global
*procvars* to nested procvars is intentionally not supported, so
that this functionality can also be implemented via compile-time
generated trampolines if necessary (e.g. for LLVM or CIL backends
as long as they don't support the aforementioned parameter passing
convention)
o a nested procvar can both be declared using a Mac/ISO Pascal style
"inline" type declaration as a parameter type, or as a stand-alone
type (in the latter case, add "is nested" at the end in analogy to
"of object" for method pointers -- note that using variables of
such a type is dangerous, because if you call them once the enclosing
stack frame no longer exists on the stack, the results are
undefined; this is however allowed for Metaware Pascal compatibility)
git-svn-id: trunk@15694 -
|
||
|---|---|---|
| .. | ||
| alpha | ||
| arm | ||
| avr | ||
| html | ||
| i386 | ||
| ia64 | ||
| m68k | ||
| mips | ||
| msg | ||
| powerpc | ||
| powerpc64 | ||
| ppcgen | ||
| sparc | ||
| systems | ||
| utils | ||
| vis | ||
| x86 | ||
| x86_64 | ||
| aasmbase.pas | ||
| aasmdata.pas | ||
| aasmsym.pas | ||
| aasmtai.pas | ||
| aggas.pas | ||
| aopt.pas | ||
| aoptbase.pas | ||
| aoptcs.pas | ||
| aoptda.pas | ||
| aoptobj.pas | ||
| asmutils.pas | ||
| assemble.pas | ||
| browcol.pas | ||
| bsdcompile | ||
| catch.pas | ||
| ccharset.pas | ||
| cclasses.pas | ||
| cfidwarf.pas | ||
| cfileutl.pas | ||
| cg64f32.pas | ||
| cgbase.pas | ||
| cgobj.pas | ||
| cgutils.pas | ||
| cmsgs.pas | ||
| comphook.pas | ||
| compiler.pas | ||
| compinnr.inc | ||
| comprsrc.pas | ||
| constexp.pas | ||
| COPYING.txt | ||
| cp437.pas | ||
| cp850.pas | ||
| cp866.pas | ||
| cp1251.pas | ||
| cp8859_1.pas | ||
| cp8859_5.pas | ||
| crefs.pas | ||
| cresstr.pas | ||
| cstreams.pas | ||
| cutils.pas | ||
| dbgbase.pas | ||
| dbgdwarf.pas | ||
| dbgstabs.pas | ||
| defcmp.pas | ||
| defutil.pas | ||
| export.pas | ||
| expunix.pas | ||
| finput.pas | ||
| fmodule.pas | ||
| fpccrc.pas | ||
| fpcdefs.inc | ||
| fppu.pas | ||
| gendef.pas | ||
| globals.pas | ||
| globtype.pas | ||
| htypechk.pas | ||
| impdef.pas | ||
| import.pas | ||
| link.pas | ||
| macho.pas | ||
| machoutils.pas | ||
| Makefile | ||
| Makefile.fpc | ||
| MPWMake | ||
| msgidx.inc | ||
| msgtxt.inc | ||
| nadd.pas | ||
| nbas.pas | ||
| ncal.pas | ||
| ncgadd.pas | ||
| ncgbas.pas | ||
| ncgcal.pas | ||
| ncgcnv.pas | ||
| ncgcon.pas | ||
| ncgflw.pas | ||
| ncginl.pas | ||
| ncgld.pas | ||
| ncgmat.pas | ||
| ncgmem.pas | ||
| ncgobjc.pas | ||
| ncgopt.pas | ||
| ncgrtti.pas | ||
| ncgset.pas | ||
| ncgutil.pas | ||
| ncnv.pas | ||
| ncon.pas | ||
| nflw.pas | ||
| ninl.pas | ||
| nld.pas | ||
| nmat.pas | ||
| nmem.pas | ||
| nobj.pas | ||
| nobjc.pas | ||
| node.pas | ||
| nopt.pas | ||
| nset.pas | ||
| nstate.pas | ||
| nutils.pas | ||
| objcdef.pas | ||
| objcgutl.pas | ||
| objcutil.pas | ||
| ogbase.pas | ||
| ogcoff.pas | ||
| ogelf.pas | ||
| oglx.pas | ||
| ogmacho.pas | ||
| ogmap.pas | ||
| optbase.pas | ||
| optcse.pas | ||
| optdead.pas | ||
| optdfa.pas | ||
| options.pas | ||
| optloop.pas | ||
| opttail.pas | ||
| optutils.pas | ||
| optvirt.pas | ||
| owar.pas | ||
| owbase.pas | ||
| parabase.pas | ||
| paramgr.pas | ||
| parser.pas | ||
| pass_1.pas | ||
| pass_2.pas | ||
| pbase.pas | ||
| pdecl.pas | ||
| pdecobj.pas | ||
| pdecsub.pas | ||
| pdecvar.pas | ||
| pexports.pas | ||
| pexpr.pas | ||
| pinline.pas | ||
| pmodules.pas | ||
| pp.lpi | ||
| pp.pas | ||
| ppc68k.lpi | ||
| ppc.cfg | ||
| ppc.conf | ||
| ppc.dof | ||
| ppcarm.lpi | ||
| ppcavr.lpi | ||
| ppcmipsel.lpi | ||
| ppcppc.lpi | ||
| ppcsparc.lpi | ||
| ppheap.pas | ||
| ppu.pas | ||
| ppx86_64.lpi | ||
| procinfo.pas | ||
| pstatmnt.pas | ||
| psub.pas | ||
| psystem.pas | ||
| ptconst.pas | ||
| ptype.pas | ||
| raatt.pas | ||
| rabase.pas | ||
| rasm.pas | ||
| rautils.pas | ||
| README.txt | ||
| regvars.pas | ||
| rescmn.pas | ||
| rgbase.pas | ||
| rgobj.pas | ||
| scandir.pas | ||
| scanner.pas | ||
| script.pas | ||
| switches.pas | ||
| symbase.pas | ||
| symconst.pas | ||
| symdef.pas | ||
| symnot.pas | ||
| symsym.pas | ||
| symtable.pas | ||
| symtype.pas | ||
| symutil.pas | ||
| systems.pas | ||
| tgobj.pas | ||
| tokens.pas | ||
| verbose.pas | ||
| version.pas | ||
| widestr.pas | ||
| wpo.pas | ||
| wpobase.pas | ||
| wpoinfo.pas | ||
This directory contains the sources of the Free Pascal Compiler
If you want to compile/modify the compiler, please read first the
programmers manual.
To recompile the compiler, you can use the batch files :
+ mppc386.bat if you want to build a cross compiler from i386 to m68k
+ mppcsparc if you want to build a cross compiler from i386 to SPARC
or
Use the make utility as following
make OS_TARGET="compiler OS target" \
CPU_TARGET="compiler CPU target" \
FPCCPUOPT="Optimization level" \
PP="compiler used to compile FPC" \
COMPILER_OPTIONS="Options passed to compiler" \
If an option is omitted, then target CPU/OS will be same as current CPU/OS
Possibles targets are : linux go32v2 win32 os2 freebsd beos netbsd amiga haiku
atari sunos qnx netware openbsd wdosx palmos macos macosx emx
Possible compiler switches (* marks a currently required switch):
-----------------------------------------------------------------
GDB* support of the GNU Debugger
I386 generate a compiler for the Intel i386+
x86_64 generate a compiler for the AMD x86-64 architecture
M68K generate a compiler for the M68000
SPARC generate a compiler for SPARC
POWERPC generate a compiler for the PowerPC
VIS generate a compile for the VIS
DEBUG version with debug code is generated
EXTDEBUG some extra debug code is executed
SUPPORT_MMX only i386: releases the compiler switch
MMX which allows the compiler to generate
MMX instructions
EXTERN_MSG Don't compile the msgfiles in the compiler, always
use external messagefiles, default for TP
NOAG386INT no Intel Assembler output
NOAG386NSM no NASM output
NOAG386BIN leaves out the binary writer, default for TP
NORA386DIR No direct i386 assembler reader
TEST_GENERIC Test Generic version of code generator
(uses generic RTL calls)
-----------------------------------------------------------------
cpuflags The target processor has status flags (on by default)
cpufpemu The target compiler will also support emitting software
floating point operations
cpu64bitaddr The targets use a 64-bit address space (pointers and
the default integer type are 64 bit)
cpu64bitalu The target cpu has 64-bit registers available (unless
cpu64bitaddr is also defined, pointers and default
integer type remain 32 bit, but the cpu can perform
64 bit calculations directly without needing helpers)
-----------------------------------------------------------------
Required switches for a i386 compiler be compiled by Free Pascal Compiler:
GDB;I386
to build a compiler to SPARC target using a Win32/i386 you just use :
make CPU_TARGET=SPARC