mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-01 05:53:41 +02:00
![]() Conflicts: compiler/pdecl.pas compiler/pexpr.pas compiler/pgenutil.pas compiler/ptype.pas The original log messages as git was a bit forgetting here :( (newest at the top): commit 7ef252de8023494ee6d39910e289f9e31658d47b Author: Sven Barth <pascaldragon@minerva> Date: Mon Nov 21 17:13:36 2011 +0100 Fix the compilation of inline specializations of which the generic is derived from another generic. pgenutil.pas, generate_specialization: * Set the "block_type" to "bt_type" when parsing the type parameters, so that the nodes are returned as "ttypenode" instead of e.g. "tloadvmtaddrnode" in case of classes outside of type sections. * Set the "block_type" to "bt_type" before calling "read_name_type", so that no unexpected sideeffects happen, because types like classes normally only are declared inside type sections (e.g. for the case a generic class is derived from another generic class a classrefdef for the specialized parent class will be created inside the derived specialized class if the block type is not a type one). commit 1041a8f7a3a41f4fdf2975ce40055c698281ce71 Author: Sven Barth <pascaldragon@minerva> Date: Fri Nov 18 19:03:50 2011 +0100 Improve inline specializations a bit, so now expressions like "TSomeGeneric<TSomeType>.SomeClassProc OP SomeNonGeneric" is possible. Using another class function of a generic as the right side is not yet working (that still needs some thinking). To achive this the generalization code must basically continue directly after the "factor" call, so that the operator and the right side are correctly parsed when walking up the call stack. This is done by jumping from the end of the specialization code in the "<"-case to the start of "sub_expr". The freshly generated node (in the above example a callnode) will be passed down the callstack through a new parameter "factornode". If that is set (currently only in the case of a specialization on the left side) "factor" won't be called and the right side will be parsed with the "factornode" as the left side. If it is not set (which is the case for all other calls to "sub_expr" in the unit) then the usual call to "factor" will be done and the result will be used as the left side. commit a01ccd265f8d6cc5a2f3e88e23afbcd3d5960afb Author: Sven Barth <pascaldragon@minerva> Date: Fri Nov 18 18:37:04 2011 +0100 Fix compilation of ppudump. symconst.pas: * Remove sto_has_generic, which was the last remainer of my "overloaded type symbols" approach. * Remove df_methods_specialized, as it isn't needed anymore with the recent "temporary symtable" solution. psub.pas, specialize_objectdefs, process_abstractrecorddef: Remove the checks for/inclusion of df_methods_specialized. utils/ppudump.pp: Add "sp_generic_dummy" to the symbol options. commit d16deac060e65d4b53e8fe9c27fe7e1f6d00a416 Author: Sven Barth <pascaldragon@minerva> Date: Wed Nov 16 16:34:51 2011 +0100 Fix compilation of "gset.pp" from fcl-stl. nld.pas: Extend ttypenode by a reference to the type symbol. Normally this is simply the typesym of the given def, but for specializations in type sections of generics this is not the case, because generate_specialization will return a reference to the generic definition and not the new one (thus the symbol will be wrong). ppu.pas: Increase PPU version because of the extension of ttypenode. pexpr.pas: * handle_factor_typenode: Extend the function by a "sym" parameter which will normally be "nil". In that case it is set to the def's typesym. The "typesym" field of the created type node is then set to this sym. * For now pass nearly always "nil" for the above mentioned sym except inside factor_read_id when we've encountered a typesym. ptype.pas, read_named_type, expr_type: Exchange the "is_owned_by" check with a "sym_is_owned_by" check so that we can correctly detect that we are using a specialized type declaration inside a generic (once nested generic are allowed this condition needs to be checked). commit 23668d2fc9070afc26b4288ed0db9a8eaf6f40e6 Author: Sven Barth <pascaldragon@minerva> Date: Wed Nov 16 07:51:12 2011 +0100 psub.pas: * tcgprocinfo.parse_body: Methods of generic classes need to set "parse_generic" as well, so that variables for "stacked generics" (generic array => generic record) inside the method body are handled correctly. * specialize_objectdefs: Don't try to generate method bodies for abstract methods. pdecvar.pas, read_property_dec: Allow specializations for the return types of properties (should they be allowed for index types as well?). symtable.pas: Add a new class "tspecializesymtable" which is basically a globalsymtable but is always assuming to be the current unit. This symtable is used in "generate_specializations" (see below) and is needed to allow visibilty checks for "private", etc. to succeed. pgenutil.pas, generate_specializations: Instead of hackily pushing a symtable that may contain conflicting symbols onto the symtable stack for the specialization, a temporary global symtable using the above mentioned "tspecializesymtable" is created and pushed. After the specialization is done all symbols and defs that were added to the temporary symtable are moved to their final symtable (either the global- or localsymtable of the unit, depending on the current position of compilation). This way symbols are correctly added to a top level symtable, but without potential side effects like resolving the wrong symbol. git-svn-id: branches/svenbarth/generics@19671 - |
||
---|---|---|
.. | ||
alpha | ||
arm | ||
avr | ||
generic | ||
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 | ||
cwindirs.pp | ||
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 | ||
ognlm.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 | ||
pgenutil.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.inc | ||
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