Commit Graph

31173 Commits

Author SHA1 Message Date
marco
27f0028dcc * deduping #urlstr and #strings
git-svn-id: trunk@13767 -
2009-09-27 16:03:08 +00:00
Jonas Maebe
ef39dff478 * forgot to commit previously
git-svn-id: branches/objc@13766 -
2009-09-27 15:44:40 +00:00
Jonas Maebe
6f3bace0f3 + support for exporting Objective-C classes from dynamic libraries. It works
the same as for exporting functions/procedures and variables: add the name
    of the class to the "exports" section of the library. By default, classes
    are only visible inside a shared library.

git-svn-id: branches/objc@13765 -
2009-09-27 15:40:52 +00:00
Jonas Maebe
046b652c28 * don't show notes about "unused" private fields of external obj-c class
declarations (since even though they're not used in the Pascal code,
    they probably are in the Objective-C code that actually implements them)

git-svn-id: branches/objc@13764 -
2009-09-27 15:28:49 +00:00
Jonas Maebe
0c675a4039 * the objc1 unit has been renamed to objc
* the objc unit links against the Foundation instead of against the Cocoa
    framework, and inludes an interface to either the fragile or non-fragile
    obj-c run time depending on the target platform
  + support for the non-fragile Objective-C runtime/ABI, as used on Mac OS X
    for ARM (iPhone) 64 bit (PowerPC/64, x86_64) -- all these targets now
    are now also supported for the objectivec1 modeswitch
  + support for private_extern symbol bindings, required for the above
  * mark objcclasses that are declared in the implementation section of a
    unit as "hidden" (not sure what the effect is, since the Objective-C
    runtime does not seem to do anything with this flag)
  * enabled all obj-c tests for the newly supported platforms

git-svn-id: branches/objc@13763 -
2009-09-27 15:24:50 +00:00
Jonas Maebe
d34276c575 --- Merging r13696 through r13760 into '.':
U    ide/fpusrscr.pas
U    rtl/unix/video.pp
U    rtl/i386/i386.inc
U    rtl/win/wininc/defines.inc
U    rtl/win/systhrd.inc
U    rtl/linux/m68k/dllprt0.as
U    rtl/linux/i386/syscall.inc
U    rtl/linux/i386/dllprt0.as
U    rtl/linux/i386/si_c.inc
U    rtl/linux/i386/si_prc.inc
U    rtl/linux/i386/si_c21.inc
U    rtl/linux/i386/si_g.inc
U    rtl/linux/i386/si_c21g.inc
U    rtl/linux/i386/si_uc.inc
U    rtl/linux/i386/si_dll.inc
U    rtl/linux/x86_64/dllprt0.as
A    tests/test/packages/hash/sha1test.pp
U    tests/webtbs/tw12038.pp
U    compiler/cclasses.pas
U    compiler/symdef.pas
U    compiler/ncon.pas
U    compiler/ncgrtti.pas
U    compiler/cgbase.pas
U    compiler/pstatmnt.pas
U    compiler/systems/t_linux.pas
U    compiler/pass_1.pas
U    compiler/x86/cgx86.pas
U    compiler/x86/agx86att.pas
U    compiler/x86/aasmcpu.pas
U    compiler/aasmbase.pas
A    packages/fcl-xml/tests/extras.pp
A    packages/fcl-xml/tests/extras2.pp
--- Merging r13696 through r13760 into 'packages/fcl-xml/tests/README_DOM.txt':
U    packages/fcl-xml/tests/README_DOM.txt
--- Merging r13696 through r13760 into '.':
U    packages/fcl-xml/tests/domunit.pp
U    packages/fcl-xml/src/xpath.pp
U    packages/Makefile
U    packages/gmp/src/gmp.pas
U    packages/gmp/readme
U    packages/fcl-db/src/base/db.pas
U    packages/fcl-db/src/base/database.inc
U    packages/sqlite/src/sqlite3.inc
U    packages/fcl-web/src/custweb.pp
U    packages/hash/fpmake.pp
U    packages/hash/Makefile.fpc
A    packages/hash/src/sha1.pp
U    packages/hash/Makefile
U    packages/hash/examples/Makefile.fpc
A    packages/hash/examples/sha1test.pp
U    packages/hash/examples/Makefile
U    packages/Makefile.fpc
U    packages/fcl-base/src/ascii85.pp
U    packages/fcl-base/src/custapp.pp
U    packages/chm/src/chmwriter.pas
U    packages/chm/src/paslzx.pas
U    packages/chm/src/chmreader.pas
--- Merging r13761 into '.':
U    compiler/powerpc/agppcvasm.pas
U    compiler/ppcgen/agppcgas.pas

git-svn-id: branches/objc@13762 -
2009-09-27 14:13:44 +00:00
Jonas Maebe
6c78ac9a78 * fixed powerpc compilation after r13760
git-svn-id: trunk@13761 -
2009-09-27 14:01:41 +00:00
Jonas Maebe
ec8fee45fe * do not access local data via the GOT on x86_64, because
a) it's unnecessary
   b) it's slower than "direct" RIP-relative accessing
   c) it's not supported on darwin/x86_64 in certain cases
  * never use absolute addressing on darwin/x86_64 (like on win64)
  * when not generating PIC, make sure that a_loadaddr_ref_reg on x86_64
    also uses RIP-relative addressing for darwin/x86_64 and win64

git-svn-id: trunk@13760 -
2009-09-27 13:43:56 +00:00
marco
9c0e066d25 * removed stale debug writeln
git-svn-id: trunk@13759 -
2009-09-25 21:34:45 +00:00
joost
1e3b13842e * Patch from Jesus Reyes to fix streaming of TDatabase.Params property, bug #14438
git-svn-id: trunk@13758 -
2009-09-25 16:59:00 +00:00
florian
39c1c4c199 * improved code generation by reducing the usage of unneeded temps due to incorrect
node processing, patch by Sergei Gorelkin

git-svn-id: trunk@13756 -
2009-09-22 19:24:25 +00:00
Jonas Maebe
b6c841b338 * added missing NSSTR() implementation (fix by Dmitry)
git-svn-id: branches/objc@13755 -
2009-09-22 14:30:21 +00:00
josef
d07a901c10 + Parser support for UIKit has been added and iPhoneAll.pas
* Pass by reference arguments are translated as pointers instead of var
  * Variable length arguments are parsed with the varargs keyword instead of array of const
  + Added IVarSize.pas which prints the size of ivar's in all AppKit/Foundation classes.
  + There are now "null" defined macros for IBOutlet and IBAction like in Cocoa. Use these instead of comments and they may become useful in the future for InterfaceBuilder support.
  + Foundation.pas is included which can be used for command line tools without AppKit.

git-svn-id: branches/objc@13754 -
2009-09-22 01:03:50 +00:00
michael
12fcb19bf4 * Added comment in SysRelocateThreadVar, not working in Windows Vista
git-svn-id: trunk@13753 -
2009-09-21 09:34:53 +00:00
Jonas Maebe
5fa268db01 * fixed passing var/out parameters to obj-c methods (test by Gorazd Krosl)
git-svn-id: branches/objc@13752 -
2009-09-21 09:06:55 +00:00
joost
45b20dac4e * Added the global variable CustomApplication. If this variable is set
when a Application-object is initialized, other units can access this
   Application-object without knowing its exact type or unit it is 
   defined in.

git-svn-id: trunk@13747 -
2009-09-20 12:42:25 +00:00
olivier
2e8a93da16 * tune new variable TerminalSupportsBold and TerminalSupportsHighIntensityColors
for BeOS and Haiku.
  * BeOS : the terminal is very limited. Disabling both give best result.
  * Haiku : Haiku's terminal claims to be xterm but has it's own problems.

git-svn-id: trunk@13741 -
2009-09-19 16:10:36 +00:00
andrew
5c64c75dd7 * fixed bug #14595
* small speed improvements

git-svn-id: trunk@13740 -
2009-09-19 01:19:35 +00:00
Jonas Maebe
c1305f046e * fixed hint for unused _cmd parameters after r13737
git-svn-id: branches/objc@13739 -
2009-09-18 11:58:17 +00:00
Jonas Maebe
4c57a5f504 + support multiple inheritance for obj-c protocols
* don't allocate tobjectdef.implementedinterfaces for corba interfaces
    since the compiler doesn't support multiple inheritance for them
  * extended/corrected related tobjc22 test
  * increased ppu version, because implementedinterfaces is now
    present in different cases

git-svn-id: branches/objc@13738 -
2009-09-18 11:35:13 +00:00
Jonas Maebe
e41c06391b * fixed class cast error
git-svn-id: branches/objc@13737 -
2009-09-18 10:42:09 +00:00
Jonas Maebe
2db72437e8 * fixed range check errors
git-svn-id: trunk@13736 -
2009-09-18 10:34:06 +00:00
joost
b52af4cd53 * Introduced TCustomWebApplication.DoHandleRequest
git-svn-id: trunk@13735 -
2009-09-18 09:34:05 +00:00
Jonas Maebe
5bda2aa648 + added warning that TImplementedInterface.getcopy is completely broken
git-svn-id: trunk@13732 -
2009-09-17 19:24:20 +00:00
Jonas Maebe
d942c99921 + support for obj-c protocols implemented in Pascal (based on patch by
Dmitry Boyarintsev, mantis #14609)

git-svn-id: branches/objc@13731 -
2009-09-17 14:24:01 +00:00
Jonas Maebe
c9a6e32f16 * implemented objcprotocol for now with a call to objc_GetProtocol()
git-svn-id: branches/objc@13730 -
2009-09-17 14:21:28 +00:00
sergei
fc34dc84ff domunit.pp:
+ Added TDOMTestBase.LoadStringData method, allows loading documents from string.
* Don't return empty string from GetResourceURI when file doesn't exist. Thus we can see the problematic filename in the test output.

+ Added extras.pp, contains a few tests not present in w3.org test suite.
+ Added extras2.pp, contains some tests ported by hand because no automatic conversion possible yet. It addresses namespace fixup during serialization and canonical-form issues.

README_DOM.txt: updated to reflect the added units.

git-svn-id: trunk@13729 -
2009-09-17 09:58:15 +00:00
marco
56e15073bb * sha1test demo + fpmake
git-svn-id: trunk@13728 -
2009-09-16 20:32:07 +00:00
florian
ce773b759d + sha1 unit by Sergei Gorelkin, resolves #14604
git-svn-id: trunk@13727 -
2009-09-16 20:24:40 +00:00
florian
07ef0c33df o another linux console patch by Nikolay Nikolov:
* disabled linux VCSA output in UTF-8 mode, because it does not do any translation 
  and assumes that the font is cp437, or similar, which looks horrible on fonts 
  (like fedora's default latarcyrheb-sun16), which are designed only for unicode 
  support and have no similarity at all to cp437. We already can display all the 
  cp437 characters in UTF-8 mode (including the low 32 characters), in case the 
  font is cp437, and the UTF-8 translation provides better approximation (e.g. 
  for the line drawing characters) if the font is not cp437.
* do not "restore" the linux system font in SysDoneVideo in UTF-8 mode, 
  since we didn't change the font on startup
* added try_grab_vcsa to try harder to open VCSA in the linux IDE user 
  screen restore code. While VCSA is no longer needed in the video unit on 
  UTF-8 systems, the IDE still needs it, because it's the only way to provide 
  the "restore user screen" functionality on the linux virtual console.

git-svn-id: trunk@13726 -
2009-09-16 19:58:42 +00:00
florian
24889df6ed * fixed breakage by r13718
git-svn-id: trunk@13725 -
2009-09-16 19:42:56 +00:00
Jonas Maebe
5128a6726c * fixed type compatibility checking for classrefs and id
* modified test for this

git-svn-id: branches/objc@13724 -
2009-09-16 19:02:05 +00:00
Jonas Maebe
341708b95d * write all parameters using the order of procdef.paras, eliminates the
special treatment required to put self as the first parameter in the
    debug info
  + added Apple-specific Objective-C related DWARF attributes
  * properly emit debug information for Objective-C classes and methods
  * fixed some typos in comments
  * properly mark "absolute" local variables mapped to parameters as
    variables in the debug info rather than as parameters (gdb expects one
    parameter to be passed when calling functions from inside gdb per
    parameter mentioned in the debug info, even if multiple parameters
    have the same stack address) 

git-svn-id: branches/objc@13723 -
2009-09-16 18:46:15 +00:00
Jonas Maebe
eb2dc7a674 * set type of self for obj-c instance methods to the type of the
class instead of to ID (gcc-compatible)

git-svn-id: branches/objc@13722 -
2009-09-16 18:40:15 +00:00
Jonas Maebe
ef2fbe7ed6 * use precalculated mangled name when writing classdef instead of
calculating it again (+ sanity check that it is really defined)

git-svn-id: branches/objc@13721 -
2009-09-16 16:44:26 +00:00
Jonas Maebe
fb2a523976 * fixed handling function results of inherited obj-c calls
(test program by Gorazd Krosl)

git-svn-id: branches/objc@13720 -
2009-09-16 13:00:50 +00:00
ivost
d9099daa9c * fixed InitializeSqlite and ReleaseSqlite functions (segfault after a call
to ReleaseSqlite with refcount=0)
* changed all shortstrings to ansistrings ({$h+})

git-svn-id: trunk@13719 -
2009-09-16 08:50:42 +00:00
florian
daa5984212 * fix by Michael Vadymovitch Denisenko for r13712
git-svn-id: trunk@13718 -
2009-09-15 21:06:29 +00:00
marco
be6322be9e * note about location win32 dll
git-svn-id: trunk@13715 -
2009-09-15 11:10:34 +00:00
marco
4eeeb3298e * enabled gmp for Win32 after verification
git-svn-id: trunk@13714 -
2009-09-15 11:10:20 +00:00
marco
33d09f97e6 * gmp disabled for go32v2
git-svn-id: trunk@13713 -
2009-09-15 10:59:32 +00:00
florian
02eeb3dad6 o update by Michael Denisenko for case <string> of
* memory management fixed
  * idention fixed

git-svn-id: trunk@13712 -
2009-09-14 21:44:11 +00:00
Jonas Maebe
14797e0ddb * fixed start compilation with FPC 2.2.4
git-svn-id: branches/objc@13709 -
2009-09-13 22:39:47 +00:00
Jonas Maebe
da7fdf76d5 * always put parameters in left-to-right order in rtti (Delphi-compatible)
* adapted test (and removed BOM)

git-svn-id: trunk@13708 -
2009-09-13 20:56:22 +00:00
marco
47e90bbdf3 * typo corrected as per #14578
git-svn-id: trunk@13707 -
2009-09-13 20:20:02 +00:00
Jonas Maebe
dac2903107 * prefetch next items in TLinkedList.clear, removes most l2 cache misses
git-svn-id: trunk@13706 -
2009-09-13 15:30:53 +00:00
Jonas Maebe
9d038943f5 * incorporated most Objective-C 1 run time functions in objc1 from
packages/objcrtl/src/objcrtl10.pas (so that if {$modeswitch objectivec1}
    is used, you don't have to include objcrtl anymore, because that unit
    declares some identifiers with the same name as in objc1, such as id,
    causing type clashes)

git-svn-id: branches/objc@13705 -
2009-09-13 15:13:14 +00:00
marco
abda06eb20 * enabled gmp for Linux,FreeBSD and Darwin (Mischi tested)
git-svn-id: trunk@13704 -
2009-09-13 14:00:06 +00:00
Jonas Maebe
92ff07deaf * several fixes by Pierre Pede (parts of his patch to mantis #12492)
o fixed gprof under linux/i386
    o fixed pic-compilation of the linux/i386 rtl
    o initialisation of linux shared libraries is now possible with pic-code

git-svn-id: trunk@13703 -
2009-09-12 21:57:41 +00:00
Jonas Maebe
61e6545483 * message changes belonging to r13701
git-svn-id: branches/objc@13702 -
2009-09-12 17:44:41 +00:00