summaryrefslogtreecommitdiffstats
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-10 16:21:08 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-10 16:21:08 +0000
commiteab4ad60e30f2629eb357673b3b2dd0084bbd12e (patch)
tree3371d9b0ed0043b145595a1f169b8e3a0f013876 /gcc/java/parse.y
parente161d1a33f33dd457c94a584e39ffcb8250afbf6 (diff)
downloadppe42-gcc-eab4ad60e30f2629eb357673b3b2dd0084bbd12e.tar.gz
ppe42-gcc-eab4ad60e30f2629eb357673b3b2dd0084bbd12e.zip
2004-05-10 Andrew Haley <aph@redhat.com>
* parse.y (create_class): Set TYPE_VFIELD. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment. * class.c (make_method_value): Replace DECL_VINDEX with call to get_method_index(). (get_dispatch_vector): Likewise. (layout_class_method): Likewise. Replace set of DECL_VINDEX with call to set_method_index(). (set_method_index): New function. (get_method_index): New function. * java-tree.h (set_method_index): New function decl. (get_method_index): New function decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 0649dbe6de1..3212ddaf078 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -4037,6 +4037,11 @@ create_class (int flags, tree id, tree super, tree interfaces)
CLASS_COMPLETE_P (decl) = 1;
add_superinterfaces (decl, interfaces);
+ /* TYPE_VFIELD' is a compiler-generated field used to point to
+ virtual function tables. In gcj, every class has a common base
+ virtual function table in java.lang.object. */
+ TYPE_VFIELD (TREE_TYPE (decl)) = TYPE_VFIELD (object_type_node);
+
/* Add the private this$<n> field, Replicate final locals still in
scope as private final fields mangled like val$<local_name>.
This doesn't not occur for top level (static) inner classes. */
OpenPOWER on IntegriCloud