aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2004-05-10 16:21:08 +0000
committerAndrew Haley <aph@gcc.gnu.org>2004-05-10 16:21:08 +0000
commitaf434fa7a17e1dadd41821663b754cde38ab3810 (patch)
tree3371d9b0ed0043b145595a1f169b8e3a0f013876 /gcc/java/parse.y
parent5950a3ac274c2c85e38a959e1231c75c564c9c2f (diff)
downloadgcc-af434fa7a17e1dadd41821663b754cde38ab3810.zip
gcc-af434fa7a17e1dadd41821663b754cde38ab3810.tar.gz
gcc-af434fa7a17e1dadd41821663b754cde38ab3810.tar.bz2
parse.y (create_class): Set TYPE_VFIELD.
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. From-SVN: r81672
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 0649dbe..3212dda 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. */