aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2006-06-16 08:56:29 +0000
committerAndrew Haley <aph@gcc.gnu.org>2006-06-16 08:56:29 +0000
commite046c56eee0e7308f8704c8c13aa6ca5230201f1 (patch)
treeff9074d933a019a660cdd900d098b48311aea034 /gcc/java
parent47392a21de0f9488d598ecfb6aac3e6d45a7457a (diff)
downloadgcc-e046c56eee0e7308f8704c8c13aa6ca5230201f1.zip
gcc-e046c56eee0e7308f8704c8c13aa6ca5230201f1.tar.gz
gcc-e046c56eee0e7308f8704c8c13aa6ca5230201f1.tar.bz2
class.c (make_class_data): When using flag_indirect_classes, don't initialize the vtable of Class instances.
2006-06-16 Andrew Haley <aph@redhat.com> * class.c (make_class_data): When using flag_indirect_classes, don't initialize the vtable of Class instances. 2006-06-16 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Don't copy the whole Class instance from the initializer: instead, copy everything but the first word (the vtable pointer). Change prototype to (const char* class_initializer). (_Jv_RegisterNewClasses): Change prototype to (const char**). * java/lang/Class.h (_Jv_RegisterNewClasses): Change prototype to (const char**). From-SVN: r114714
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/class.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 8758c77..98d90e6 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-16 Andrew Haley <aph@redhat.com>
+
+ * class.c (make_class_data): When using flag_indirect_classes,
+ don't initialize the vtable of Class instances.
+
2006-06-09 Andrew Haley <aph@redhat.com>
PR java/1305
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 972877d..10992b8 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -1863,10 +1863,12 @@ make_class_data (tree type)
START_RECORD_CONSTRUCTOR (temp, object_type_node);
PUSH_FIELD_VALUE (temp, "vtable",
- build2 (PLUS_EXPR, dtable_ptr_type,
- build1 (ADDR_EXPR, dtable_ptr_type,
- class_dtable_decl),
- dtable_start_offset));
+ (flag_indirect_classes
+ ? null_pointer_node
+ : build2 (PLUS_EXPR, dtable_ptr_type,
+ build1 (ADDR_EXPR, dtable_ptr_type,
+ class_dtable_decl),
+ dtable_start_offset)));
if (! flag_hash_synchronization)
PUSH_FIELD_VALUE (temp, "sync_info", null_pointer_node);
FINISH_RECORD_CONSTRUCTOR (temp);