aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
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/decl.c
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/decl.c')
-rw-r--r--gcc/java/decl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 8720423..047c0af 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -638,6 +638,9 @@ java_init_decl_processing (void)
otable_ptr_type = build_pointer_type (otable_type);
PUSH_FIELD (object_type_node, field, "vtable", dtable_ptr_type);
+ DECL_FCONTEXT (field) = object_type_node;
+ TYPE_VFIELD (object_type_node) = field;
+
/* This isn't exactly true, but it is what we have in the source.
There is an unresolved issue here, which is whether the vtable
should be marked by the GC. */