Commit Graph

18 Commits

Author SHA1 Message Date
florian
68eb921d46 * broken compilation after r39347 fixed
git-svn-id: trunk@39349 -
2018-06-30 12:30:25 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
Jonas Maebe
0dcedf3799 * do not crash but give a fatal error when using Objective-Pascal code
without {$modeswitch objectivec1}

git-svn-id: trunk@15163 -
2010-04-24 12:49:16 +00:00
Jonas Maebe
3660bf7f98 * integrated the transformation of an Objective-C method call into a call
to objc_msgSend* into the callnode. This allows reusing the current
    call node rather than having to create a new one, and is in particular
    necessary because even though the objc_msgSend* functions are declared
    as varargs, you're supposed to typecast them to the function type
    describing the method before calling them (so they should *not* use
    varargs calling conventions!)
  * for the above, a field called fobjcforcedprocname has been added to the
    callnode, which can be set to a string that will be used as the (mangled)
    name of the function to call instead of the mangled name of the procsym
  -> fixes calling obj-c methods with floating point arguments on ppc

git-svn-id: branches/objc@13783 -
2009-10-01 12:05:11 +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
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
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
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
Jonas Maebe
6fcd29c190 * fixed the parameter order of self/_cmd relative to the hidden function
result parameter (cosmetic, since those parameter were not actually used)
  * fixed calling obj-c methods where the result is returned via a hidden
    parameter: since the hidden result remains hidden in the newly constructed
    objc_msgSendStret*() variant, it is inserted again by the new callnode
    -> remove the one inserted by the original callnode

git-svn-id: branches/objc@13692 -
2009-09-11 17:54:53 +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
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
2799cfd83f + parser-side of objcprotocol() expression to obtain the metaclass
associated with an Objective-C protocol. Code generator part will
    always generate an internalerror currently, because it cannot yet
    be implemented (needs support for generating RTTI for Objective-C
    classes)

git-svn-id: branches/objc@13461 -
2009-07-26 16:03:37 +00:00
Jonas Maebe
2bcef8e018 * fixed typo in comment
git-svn-id: branches/objc@13374 -
2009-07-09 16:03:59 +00:00
Jonas Maebe
5691da116f * replace the contents of the dummy self and msgsel parameters when
transforming objc-calls, rather than adding new such parameters
    (fixes calling objc-methods on ppc)

git-svn-id: branches/objc@13174 -
2009-05-18 15:13:36 +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
Jonas Maebe
b1c32d899b * fixed check for objc-methods passed to selector()
git-svn-id: trunk@12871 -
2009-03-09 08:40:55 +00:00
Jonas Maebe
6165536b5e + added {$modeswitch objectivec1}/-Mobjectivec1 mode switch to enable
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
    can be used cumulatively with every syntax mode. Note that a {$mode xxx}
    statement resets all mode switches as well, so you cannot use the
    -Mobjectivec1 variant if you have such a statement in a unit. This
    modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
    as the backend support is not yet implemented for other platforms.
  + implemented selector() statement that can be used to create an Objective-C
    selector for the message with the specified *constant* name (in the future,
    it will also work for Objective-C method identifiers)
  + added SEL type to the system unit (the selector() statement returns it)
  + added all Objective-C segments to the assembler writers
  + (currently mostly dummy) objc1 unit that is automatically included if the
    {$modeswitch objectivec1} statement is used
  + some tests for the selector() statement

git-svn-id: trunk@12870 -
2009-03-08 18:40:32 +00:00