diff options
author | Andrew Haley <aph@redhat.com> | 2006-06-16 08:56:29 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2006-06-16 08:56:29 +0000 |
commit | e046c56eee0e7308f8704c8c13aa6ca5230201f1 (patch) | |
tree | ff9074d933a019a660cdd900d098b48311aea034 /gcc/java/class.c | |
parent | 47392a21de0f9488d598ecfb6aac3e6d45a7457a (diff) | |
download | gcc-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/class.c')
-rw-r--r-- | gcc/java/class.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); |