summaryrefslogtreecommitdiffstats
path: root/libobjc
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-17 11:01:31 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-17 11:01:31 +0000
commit8e03fb20974e43b5302f7c4f3548b3bf41352e25 (patch)
tree013659d5354d68e2fe8c2c1e6e3d02449f4adf4b /libobjc
parent8cd81a768449c1bc921d1e403d8a3c19480ee8f1 (diff)
downloadppe42-gcc-8e03fb20974e43b5302f7c4f3548b3bf41352e25.tar.gz
ppe42-gcc-8e03fb20974e43b5302f7c4f3548b3bf41352e25.zip
In libobjc/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> * init.c (objc_send_load): Do not wait for NXConstantString to be registered before executing +load. There is no point if -fconstant-string-class=xxx is used when compiling all modules, as is the case for almost all users. * linking.m (__objc_linking): Do not try to forcefully link in NXConstantString. In gcc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> * doc/objc.texi (What you can and what you cannot do in +load): Document that sending messages to constant string objects in +load is not guaranteed to work. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165583 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog9
-rw-r--r--libobjc/init.c11
-rw-r--r--libobjc/linking.m5
3 files changed, 15 insertions, 10 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 1d2b2948605..6e70ac762ea 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * init.c (objc_send_load): Do not wait for NXConstantString to be
+ registered before executing +load. There is no point if
+ -fconstant-string-class=xxx is used when compiling all modules,
+ as is the case for almost all users.
+ * linking.m (__objc_linking): Do not try to forcefully link in
+ NXConstantString.
+
2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com>
* objc/runtime.h: Updated comments.
diff --git a/libobjc/init.c b/libobjc/init.c
index dd8789c9cac..d87a587a8af 100644
--- a/libobjc/init.c
+++ b/libobjc/init.c
@@ -444,8 +444,7 @@ class_is_subclass_of_class (Class class, Class superclass)
their superclasses are not yet known to the runtime. */
static struct objc_list *unresolved_classes = 0;
-/* Extern function used to reference the Object and NXConstantString
- classes. */
+/* Extern function used to reference the Object class. */
extern void __objc_force_linking (void);
@@ -755,11 +754,9 @@ objc_send_load (void)
return;
}
- /* Special check to allow creating and sending messages to constant
- strings in +load methods. If these classes are not yet known,
- even if all the other classes are known, delay sending of +load. */
- if (! objc_lookup_class ("NXConstantString") ||
- ! objc_lookup_class ("Object"))
+ /* Special check. If 'Object', which is used by meta-classes, has
+ not been loaded yet, delay sending of +load. */
+ if (! objc_lookup_class ("Object"))
return;
/* Iterate over all modules in the __objc_module_list and call on
diff --git a/libobjc/linking.m b/libobjc/linking.m
index e94c8ea8c4b..4438a668ce4 100644
--- a/libobjc/linking.m
+++ b/libobjc/linking.m
@@ -27,12 +27,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <objc/Object.h>
#include <objc/NXConstStr.h>
-/* Generate references to Object and NXConstanstString classes since they are
- needed by the runtime system to run correctly. */
+/* Generate references to Object class since it is needed by the
+ runtime system to run correctly. */
void __objc_linking (void)
{
[Object name];
- [NXConstantString name];
}
OpenPOWER on IntegriCloud