Commit Graph

17 Commits

Author SHA1 Message Date
Jonas Maebe
f191ab39cd * don't use a voidpointer typecast to access hardcoded objc fields, because
that sets the alignment to 1 and hence causes unnecessary unaligned
    loads/stores on ARM

git-svn-id: trunk@14291 -
2009-11-30 20:43:48 +00:00
Jonas Maebe
a6716fd2a2 * fixed calling inherited class methods from category methods when using
the iPhoneOS/Mac OS X 10.6 objc runtime interface (tests/test/tobjc25.pp)

git-svn-id: trunk@14289 -
2009-11-29 21:41:47 +00:00
Jonas Maebe
f8754d8fab + Objective-C category support (old and new ABI, both external and
implemented in Pascal). See
    http://wiki.freepascal.org/FPC_PasCocoa#Category_declaration for syntax
    details

git-svn-id: trunk@14196 -
2009-11-16 00:12:08 +00:00
Jonas Maebe
8700874a96 * don't call class_getSuperClass() anymore to obtain the superclass, but
load it inline. This should be safe even on the non-fragile ABI, because
    the isa and superclass fields are expected at fixed offsets by the runtime
    (and gcc and clang also use direct memory accesses in this case)

git-svn-id: branches/objc@13784 -
2009-10-01 12:07:22 +00:00
Jonas Maebe
97ba8de56c * don't export the symbols for "strict private" fields (it was only not
done for regular private fields)

git-svn-id: branches/objc@13782 -
2009-10-01 11:55:23 +00:00
Jonas Maebe
3f0eee741a * fixed checking whether first character of a selector is valid (patch by
Dmitry Boyarintsev, mantis #14680)

git-svn-id: branches/objc@13768 -
2009-09-28 08:40:27 +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
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
b76def10b2 + check whether selector names are valid when they are specified in a class
delcaration (instead of only for objcselector() nodes)
  * also print the wrong selector itself when it's wrong

git-svn-id: branches/objc@13689 -
2009-09-11 16:12:27 +00:00
Jonas Maebe
3c9e1742dd * fixed calling inherited methods in Objective-C + test
git-svn-id: branches/objc@13686 -
2009-09-09 22:27:39 +00:00
Jonas Maebe
e0b7e8aa55 * made internalerror unique
git-svn-id: branches/objc@13683 -
2009-09-09 09:30:52 +00:00
Jonas Maebe
1048ac96d5 * skip hidden function result parameters when generating message signatures
git-svn-id: branches/objc@13662 -
2009-09-06 17:18:49 +00:00
Jonas Maebe
27385550f8 * use the (sorted) paras rather than the (unsorted) parasymtable when
generating method signatures

git-svn-id: branches/objc@13661 -
2009-09-06 17:15:00 +00:00
Jonas Maebe
b3737214b0 * use paraloc info to obtain parameter size (instead of (re)calulcating it
from the def)
  + added (disabled) code to correctly calculate the parameter offsets for
    ppc, see comments why it's not activated

git-svn-id: branches/objc@13619 -
2009-08-30 09:30:59 +00:00
Jonas Maebe
8def2c2ac3 * fixed compilation after introduction of strict class type checking
for var/out parameters

git-svn-id: branches/objc@13597 -
2009-08-25 19:43:45 +00:00
Jonas Maebe
5885866990 + support for objcencode() (equivalent of Objective-C's @encode()) + test
+ functionality to encode Objective-C function signatures (untested)

git-svn-id: branches/objc@13557 -
2009-08-18 19:54:02 +00:00
Jonas Maebe
b1b9894ae3 * initial Objective-C 1.0 support:
o support for declaring external Objective-C classes (see
      rtl/inc/objcbase.pas), including derived classes
    o support for converting methods of objcclasses into selectors
      (see tests/test/tobjc1.pp)
    o support for loading from/storing to fields of objcclasses
    o support for calling Objective-C methods using regular
      Object Pascal syntax (see tests/test/tobjc1.pp)
    o some things that are known to be not yet working:
      o automatic conversion from ID to objcclasses and back
      o declaring and implementing new objcclasses/methods in Pascal code
      o debug information (objcclasses are currently plain pointers
        as far as the debugger knows)

git-svn-id: branches/objc@13162 -
2009-05-17 13:42:50 +00:00