From af434fa7a17e1dadd41821663b754cde38ab3810 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Mon, 10 May 2004 16:21:08 +0000 Subject: parse.y (create_class): Set TYPE_VFIELD. 2004-05-10 Andrew Haley * 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 --- gcc/java/parse.y | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/java/parse.y') 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$ field, Replicate final locals still in scope as private final fields mangled like val$. This doesn't not occur for top level (static) inner classes. */ -- cgit v1.1