fpc/rtl
Jonas Maebe bd09b88a5b + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
o blocks are implemented as a variation of procedure variables
   o declaration of a block variable: "test: procedure(c: char) is block;"
     (C equivalent: (void)(^test)(char c) )
   o the compiler automatically converts procedures/functions whose address
     is passed to a block parameter or assigned to a block variable into
     a "block". This consists of
    1) generating a block descriptor (containing the size of the "block
       literal" (see below) and the signature of the invocation function
       encoded as an Objective-C selector)
    2) generating a wrapper function around the original funcion (with C
       calling convention), that has an extra first hidden parameter
       (marked as vo_is_parentfp in the compiler) whose type is a pointer
       to the describing "block literal"
    3) generating the "block literal", which contains a pointer to an
       external variable indicating whether this block captures context or
       not, some flags (see compiler/blockutl.get_block_literal_flags for
       info), a pointer to the wrapper function and a pointer to the
       descriptor. In the future, it will also contain captured variables.
   o right now, only global procedures/functions can be converted to blocks
     (because they don't require state capturing). The next steps are (Object
     Pascal) methods (not Objective-C methods, because Objective-C method
     procvars don't exist) and finally nested functions
   o on Mac OS X, the functionality will only work on Mac OS X 10.7 and later,
     because we have to use the so-called "ABI.2010.3.16" to ensure that
     our blocks aren't called as variadic functions by the runtime (which
     came out after the Mac OS X 10.6 release)
   o while the currently implemented functionality does not require any
     library support at all, there's no use enabling it on other platforms
     because unless it has been confirmed to work with a blocks runtime,
     there's no point in using blocks (they're just somewhat bulky procvars
     right now). Enabling it on other platforms (in combination with the
     GNUStep Objective-C run time), should simply be a matter of adding
     the right {$linklib xxx} statement to rtl/inc/blockrtl.pp file, adding
     that file to Makefile.fpc for that platform and adding that platform
     to the compiler/systems.systems_blocks_supported set

git-svn-id: branches/blocks@28232 -
2014-07-18 09:15:22 +00:00
..
aix
amiga fixed some recently added external vs. public mixup, so Amiga binaries even link again 2014-05-04 23:11:38 +00:00
android
arm - ARM: cleaned out code corresponding to FPC_STRTOSHORTSTRINGPROC not defined (obsolete and removed from other targets long ago). 2014-05-31 00:38:01 +00:00
atari
avr
beos
bsd * Some convenience permission constants, patch by Graeme 2014-06-23 15:35:43 +00:00
charmaps
darwin + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension) 2014-07-18 09:15:22 +00:00
embedded Applied patch from Michael Ring that adds some startup code for some new stm32f0 and stm32f1 controllers, and fixes naming on some LPC ARMv6m controllers. 2014-06-20 06:49:04 +00:00
emx
freebsd * Extention -> extension (By Reinier, bug ID ) 2014-05-10 15:31:22 +00:00
gba
go32v2 * fix for SIGSEGV in Exec without command line parameters revealed in discussion for 2014-05-18 20:37:40 +00:00
haiku * patch from , haiku builds character units (and dependencies) 2014-07-15 10:27:22 +00:00
i386 - Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc. 2014-05-31 00:49:40 +00:00
i8086 + added HexStr() overload for huge pointers 2014-07-07 15:13:29 +00:00
inc + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension) 2014-07-18 09:15:22 +00:00
java * synchronised JVM versions of generic include files with current generic 2014-06-01 14:13:40 +00:00
jvm
linux * m68k: updated/fixed dllprt0.as, now able to link a shared library. 2014-07-09 22:59:13 +00:00
m68k * m68k: "or" without suffix is not accepted, must be "or.l" 2014-07-08 18:48:57 +00:00
macos
mips * Enabled internal handling of Abs(longint) for all targets. It has been implemented in cross-platform way ages ago (see tcginlinenode.second_abs_long), but not enabled on MIPS,SPARC and m68k. 2014-06-05 10:35:51 +00:00
mipsel
morphos
msdos - rm the 'Memory allocation error' and 'Not enough memory' error messages from 2014-06-25 23:16:55 +00:00
nativent
nds
netbsd
netware
netwlibc
objpas * finance functions by wp, mantis 2014-07-08 12:45:11 +00:00
openbsd - Remove openbsd/classes.pp and use generic unix/classes.pp instead. These files are identical, excluding whitespace and comments. 2014-04-26 15:09:33 +00:00
os2
palmos
powerpc - Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc. 2014-05-31 00:49:40 +00:00
powerpc64 - Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc. 2014-05-31 00:49:40 +00:00
qnx
solaris
sparc * Enabled internal handling of Abs(longint) for all targets. It has been implemented in cross-platform way ages ago (see tcginlinenode.second_abs_long), but not enabled on MIPS,SPARC and m68k. 2014-06-05 10:35:51 +00:00
symbian
ucmaps
unix * save original widestring manager on entry and restore it on exit, so that 2014-06-01 18:30:49 +00:00
watcom * fix for SIGSEGV in Exec without command line parameters revealed in discussion for 2014-05-18 20:37:40 +00:00
wii
win * improved winexec comment, updated copyright year and add minor comment to gettickcount64 2014-05-31 14:47:31 +00:00
win32
win64
wince * Extention -> extension (By Reinier, bug ID ) 2014-05-10 15:30:57 +00:00
x86_64
COPYING.FPC
COPYING.txt
fpmake.inc
fpmake.pp - Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc. 2014-05-31 00:49:40 +00:00
Makefile
Makefile.fpc
README.txt

This is the Run-Time Library (RTL) tree for Free Pascal.

To recompile the RTL, edit the main makefile. The makefiles NEED a GNU make
compatible make, they need unix-like 'rm' and 'mv' commands, as well as some
others. You can find these in the gnuutils package on the ftp site.

The main makefile is located ABOVE the RTL tree. It uses the FPC
makefile.fpc to guess reasonable defaults for everything it needs.
(these files can be found in base.zip on the FTP site)

The only variable that you may want to set are
FPC             - What compiler to use. Use an absolute path. 
                  (default is ppc386)
INSTALL_UNITDIR - Where to install the RTL units 
OPT             - any special options you want to set for the compiler.

In principle, you can also descend into the subdirectory of your OS, and
type 'make' there, that should also compile everything.

The tree contains subdirectories for all the supported operating systems,
as well as all processor architectures. The processor directories contain
low-level routines which are required for the system unit (if they are not 
available in high-level language form), as well as optimized versions of
the pascal generic routines (the generic routine source code is localed in
the inc subdirectory).

The following directories are not supported officially and may not work
correctly with FreePascal v1.0:

go32v1 - The DJGPP go32v1 DOS extender (no longer supported)
palmos - The PalmOS directory for the Dragonball (incomplete)


Enjoy.