]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/commitdiff
In gcc/testsuite/:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 Dec 2010 01:29:09 +0000 (01:29 +0000)
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 Dec 2010 01:29:09 +0000 (01:29 +0000)
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

* objc.dg/gnu-api-2-resolve-method.m: Include objc/message.h.
* obj-c++.dg/gnu-api-2-resolve-method.m: Include objc/message.h.

In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

* Makefile.in (OBJC_DEPRECATED_H): Added objc_msg_sendv.h.
* objc/deprecated/objc_msg_sendv.h: New.
* objc/message.h: Do not define retval_t, apply_t, arglist,
arglist_t, objc_msg_sendv, now in
objc/deprecated/objc_msg_sendv.h.
* objc/objc.h: Do not include message.h; include
objc/deprecated/objc_msg_sendv.h instead.  Tidied up comments.
* sendmsg.c: Include objc/message.h.
* thr.c: Include objc/message.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168042 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm
gcc/testsuite/objc.dg/gnu-api-2-resolve-method.m
libobjc/ChangeLog
libobjc/Makefile.in
libobjc/objc/deprecated/objc_msg_sendv.h [new file with mode: 0644]
libobjc/objc/message.h
libobjc/objc/objc.h
libobjc/sendmsg.c
libobjc/thr.c

index d3bb0def1ce7073c5b3304c742e80abddd237e15..6f30e61b1747528be054ed86b506d734310c7a08 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * objc.dg/gnu-api-2-resolve-method.m: Include objc/message.h.
+       * obj-c++.dg/gnu-api-2-resolve-method.m: Include objc/message.h.
+
 2010-12-18  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/46969
index 09f21b9ec63c45b87d758a83159b9c71cc243d64..f8a54d392c3ec132341326c705ba02c5b050782f 100644 (file)
@@ -9,6 +9,10 @@
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
 #include <objc/runtime.h>
+
+/* For __objc_msg_forward2.  */
+#include <objc/message.h>
+
 #include <stdlib.h>
 #include <iostream>
 #include <cstring>
index 767dc73cf337b5a41da81ed6fac9839123ebaef8..a387709908cf7c08ffc66cea0caa9820b9a291e3 100644 (file)
@@ -9,6 +9,10 @@
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
 #include <objc/runtime.h>
+
+/* For __objc_msg_forward2.  */
+#include <objc/message.h>
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 2dea497a95ef273e6b98fd1eaf112f2249d6c372..dd0769029c8208fac23e56f2f8ef18d128d944b1 100644 (file)
@@ -1,3 +1,15 @@
+2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * Makefile.in (OBJC_DEPRECATED_H): Added objc_msg_sendv.h.
+       * objc/deprecated/objc_msg_sendv.h: New.
+       * objc/message.h: Do not define retval_t, apply_t, arglist,
+       arglist_t, objc_msg_sendv, now in
+       objc/deprecated/objc_msg_sendv.h.
+       * objc/objc.h: Do not include message.h; include
+       objc/deprecated/objc_msg_sendv.h instead.  Tidied up comments.
+       * sendmsg.c: Include objc/message.h.
+       * thr.c: Include objc/message.h.
+       
 2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * objc/objc-exception.h: Include objc-decls.h.  Mark all
index 0040511bf614ebe61d750f11192a363fcd04ee1f..c519542e0726608dc5cd4bbc8513e3b5291f15bd 100644 (file)
@@ -142,6 +142,7 @@ OBJC_DEPRECATED_H = \
   objc_error.h \
   objc_get_uninstalled_dtable.h \
   objc_malloc.h \
+  objc_msg_sendv.h \
   objc_object_alloc.h \
   objc_unexpected_exception.h \
   objc_valloc.h \
diff --git a/libobjc/objc/deprecated/objc_msg_sendv.h b/libobjc/objc/deprecated/objc_msg_sendv.h
new file mode 100644 (file)
index 0000000..825d9a7
--- /dev/null
@@ -0,0 +1,12 @@
+/* The following types and functions are provided only for
+   backwards-compatibility and should not be used in new code.  They
+   were deprecated in GCC 4.6 and will be removed in the next
+   release.  */
+typedef void* retval_t;                /* return value */
+typedef void(*apply_t)(void);  /* function pointer */
+typedef union arglist {
+  char *arg_ptr;
+  char arg_regs[sizeof (char*)];
+} *arglist_t;                  /* argument frame */
+
+objc_EXPORT retval_t objc_msg_sendv(id, SEL, arglist_t);
index 66f0160c1e856b05d9399c1dd7a79fa582672751..9d5e6d8e657f338a6a99b7d8511123d142262479 100644 (file)
@@ -137,20 +137,6 @@ objc_EXPORT IMP objc_msg_lookup_super (struct objc_super *super, SEL sel);
 objc_EXPORT IMP (*__objc_msg_forward)(SEL);
 objc_EXPORT IMP (*__objc_msg_forward2)(id, SEL);
 
-
-/* The following types and functions are provided only for
-   backwards-compatibility and should not be used in new code.  They
-   were deprecated in GCC 4.6 and will be removed in the next
-   release.  */
-typedef void* retval_t;                /* return value */
-typedef void(*apply_t)(void);  /* function pointer */
-typedef union arglist {
-  char *arg_ptr;
-  char arg_regs[sizeof (char*)];
-} *arglist_t;                  /* argument frame */
-
-objc_EXPORT retval_t objc_msg_sendv(id, SEL, arglist_t);
-
 #ifdef __cplusplus
 }
 #endif
index 7d382169dfbf5a7081ebacf4c3cdb327e3c80f32..ece0f88410500f66128140dd8efce1631df7daa8 100644 (file)
@@ -28,8 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* This file contains the definition of the basic types used by the
    Objective-C language.  It needs to be included to do almost
-   anything with Objective-C.
-*/
+   anything with Objective-C.  */
 
 #ifdef __cplusplus
 extern "C" {
@@ -37,25 +36,27 @@ extern "C" {
 
 #include <stddef.h>
 
+/* objc-decls.h is included because deprecated/objc_msg_sendv.h needs
+   it.  When that goes away, the include of objc-decls.h should be
+   removed.  */
+#include "objc-decls.h"
+
 /* The current version of the GNU Objective-C Runtime library in
    compressed ISO date format.  This should be updated any time a new
    version is released with changes to the public API (there is no
    need to update it if there were no API changes since the previous
    release).  This macro is only defined starting with the GNU
    Objective-C Runtime shipped with GCC 4.6.0.  If it is not defined,
-   it is either an older version of the runtime, or another runtime.
-*/
+   it is either an older version of the runtime, or another runtime.  */
 #define __GNU_LIBOBJC__ 20100911
 
-/*
-  Definition of the boolean type.
+/* Definition of the boolean type.
 
-  Compatibility note: the Apple/NeXT runtime defines a BOOL as a
-  'signed char'.  The GNU runtime uses an 'unsigned char'.
+   Compatibility note: the Apple/NeXT runtime defines a BOOL as a
+   'signed char'.  The GNU runtime uses an 'unsigned char'.
 
-  Important: this could change and we could switch to 'typedef bool
-  BOOL' in the future.  Do not depend on the type of BOOL.
-*/
+   Important: this could change and we could switch to 'typedef bool
+   BOOL' in the future.  Do not depend on the type of BOOL.  */
 #undef BOOL
 typedef unsigned char  BOOL;
 
@@ -65,8 +66,7 @@ typedef unsigned char  BOOL;
 /* The basic Objective-C types (SEL, Class, id) are defined as pointer
    to opaque structures.  The details of the structures are private to
    the runtime and may potentially change from one version to the
-   other.
-*/
+   other.  */
 
 /* A SEL (selector) represents an abstract method (in the
    object-oriented sense) and includes all the details of how to
@@ -74,16 +74,14 @@ typedef unsigned char  BOOL;
    types) but provides no implementation of its own.  You can check
    whether a class implements a selector or not, and if you have a
    selector and know that the class implements it, you can use it to
-   call the method for an object in the class.
- */
+   call the method for an object in the class.  */
 typedef const struct objc_selector *SEL;
 #include "deprecated/struct_objc_selector.h"
 
 /* A Class is a class (in the object-oriented sense).  In Objective-C
    there is the complication that each Class is an object itself, and
    so belongs to a class too.  This class that a class belongs to is
-   called its 'meta class'.
-*/
+   called its 'meta class'.  */
 typedef struct objc_class *Class;
 #include "deprecated/MetaClass.h"
 #include "deprecated/struct_objc_class.h"
@@ -91,32 +89,29 @@ typedef struct objc_class *Class;
 /* An 'id' is an object of an unknown class.  The way the object data
    is stored inside the object is private and what you see here is
    only the beginning of the actual struct.  The first field is always
-   a pointer to the Class that the object belongs to.
-*/
+   a pointer to the Class that the object belongs to.  */
 typedef struct objc_object
 {
   /* 'class_pointer' is the Class that the object belongs to.  In case
      of a Class object, this pointer points to the meta class.
 
      Compatibility Note: The Apple/NeXT runtime calls this field
-     'isa'.  To access this field in a portable way, use
-     object_getClass() from runtime.h, which is an inline function so
-     does not add any overhead.  */
+     'isa'.  To access this field, use object_getClass() from
+     runtime.h, which is an inline function so does not add any
+     overhead and is also portable to other runtimes.  */
   Class class_pointer;
 } *id;
 
-/*
-  'IMP' is a C function that implements a method.  When retrieving the
-  implementation of a method from the runtime, this is the type of the
-  pointer returned.  The idea of the definition of IMP is to represent
-  a 'pointer to a general function taking an id, a SEL, followed by
-  other unspecified arguments'.  You must always cast an IMP to a
-  pointer to a function taking the appropriate, specific types for
-  that function, before calling it - to make sure the appropriate
-  arguments are passed to it.  The code generated by the compiler to
-  perform method calls automatically does this cast inside method
-  calls.
-*/
+/* 'IMP' is a C function that implements a method.  When retrieving
+   the implementation of a method from the runtime, this is the type
+   of the pointer returned.  The idea of the definition of IMP is to
+   represent a 'pointer to a general function taking an id, a SEL,
+   followed by other unspecified arguments'.  You must always cast an
+   IMP to a pointer to a function taking the appropriate, specific
+   types for that function, before calling it - to make sure the
+   appropriate arguments are passed to it.  The code generated by the
+   compiler to perform method calls automatically does this cast
+   inside method calls.  */
 typedef id (*IMP)(id, SEL, ...); 
 
 /* 'nil' is the null object.  Messages to nil do nothing and always
@@ -135,21 +130,18 @@ typedef id (*IMP)(id, SEL, ...);
 /* TODO: Move the 'Protocol' declaration into objc/runtime.h.  A
    Protocol is simply an object, not a basic Objective-C type.  The
    Apple runtime defines Protocol in objc/runtime.h too, so it's good
-   to move it there for API compatibility.
-*/
+   to move it there for API compatibility.  */
 
 /* A 'Protocol' is a formally defined list of selectors (normally
    created using the @protocol Objective-C syntax).  It is mostly used
    at compile-time to check that classes implement all the methods
    that they are supposed to.  Protocols are also available in the
-   runtime system as Protocol objects.
- */
+   runtime system as Protocol objects.  */
 #ifndef __OBJC__
   /* Once we stop including the deprecated struct_objc_protocol.h
      there is no reason to even define a 'struct objc_protocol'.  As
      all the structure details will be hidden, a Protocol basically is
-     simply an object (as it should be).
-   */
+     simply an object (as it should be).  */
   /* typedef struct objc_object Protocol; */
   #include "deprecated/struct_objc_protocol.h"
 #else /* __OBJC__ */
@@ -158,8 +150,9 @@ typedef id (*IMP)(id, SEL, ...);
 
 /* Deprecated include - here temporarily, for backwards-compatibility
    as reval_t, apply_t, arglist_t and objc_msg_lookup() used to be
-   defined here.  */
-#include "message.h"
+   defined here.  objc_msg_lookup() is now defined in message.h,
+   included by objc-api.h or runtime.h.  */
+#include "deprecated/objc_msg_sendv.h"
 
 /* Compatibility note: the Apple/NeXT runtime defines sel_getName(),
    sel_registerName(), object_getClassName(), object_getIndexedIvars()
@@ -167,8 +160,7 @@ typedef id (*IMP)(id, SEL, ...);
 
    The reason the GNU runtime does not define them here is that they
    are not basic Objective-C types (defined in this file), but are
-   part of the runtime API (defined in runtime.h).
-*/
+   part of the runtime API (defined in runtime.h).  */
 
 #ifdef __cplusplus
 }
index 8797c82c98153cb39740b04f6809f62aa8ed3b0a..e41a190eb373c76dc0a0f015a78deeb70caf8dc2 100644 (file)
@@ -34,6 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include "coretypes.h"
 #include "tm.h"
 #include "objc/runtime.h"
+#include "objc/message.h"          /* For objc_msg_lookup(), objc_msg_lookup_super().  */
 #include "objc/thr.h"
 #include "objc-private/module-abi-8.h"
 #include "objc-private/runtime.h"
index b1fde3db920bdb55ffd71a93bfc73a4b25b663d0..3f7e5c525fae33f892af88acbd1dc4562595f83d 100644 (file)
@@ -38,6 +38,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include "tm.h"
 #include "defaults.h"
 #include "objc/thr.h"
+#include "objc/message.h" /* For objc_msg_lookup().  */
 #include "objc/runtime.h"
 #include "objc-private/runtime.h"
 #include <gthr.h>