aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2000-03-07 08:58:26 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-03-07 00:58:26 -0800
commit173f556ccc41ea93cf66896d0c7778241467407f (patch)
tree7f5247f181780723c8e8790acc8c5afc9d20e754 /gcc/java/decl.c
parentf2d2acce60eb9ec6ba79c3619a949c84d130b60e (diff)
downloadgcc-173f556ccc41ea93cf66896d0c7778241467407f.zip
gcc-173f556ccc41ea93cf66896d0c7778241467407f.tar.gz
gcc-173f556ccc41ea93cf66896d0c7778241467407f.tar.bz2
decl.c (init_decl_processing): Added new class fields `depth', `ancestors', and `idt' to class_type_node.
2000-03-06 Bryce McKinlay <bryce@albatross.co.nz> * decl.c (init_decl_processing): Added new class fields `depth', `ancestors', and `idt' to class_type_node. Use _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node. * class.c (make_class_data): Push initial values for new fields. * java-tree.h: Updated prototype for `build_invokeinterface'. * expr.c (build_invokeinterface): Changed parameters to accept `method' tree. Calculate index of `method' in its declaring interface. Build call to _Jv_LookupInterfaceMethodIdx. (expand_invoke): Call `build_invokeinterface' with new parameters. * parse.y (patch_invoke): Call `build_invokeinterface' with new parameters. (This is Bryce McKinlay's implementation of the interfaces constant-time dispatch and type checking techniques designed by Per Bothner.) From-SVN: r32381
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index f258ed8..17ec135 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -661,6 +661,9 @@ init_decl_processing ()
PUSH_FIELD (class_type_node, field, "interface_count", short_type_node);
PUSH_FIELD (class_type_node, field, "state", byte_type_node);
PUSH_FIELD (class_type_node, field, "thread", ptr_type_node);
+ PUSH_FIELD (class_type_node, field, "depth", short_type_node);
+ PUSH_FIELD (class_type_node, field, "ancestors", ptr_type_node);
+ PUSH_FIELD (class_type_node, field, "idt", ptr_type_node);
for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t))
FIELD_PRIVATE (t) = 1;
push_super_field (class_type_node, object_type_node);
@@ -815,9 +818,9 @@ init_decl_processing ()
0, NOT_BUILT_IN, NULL_PTR);
t = tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
- tree_cons (NULL_TREE, ptr_type_node, endlink)));
+ tree_cons (NULL_TREE, int_type_node, endlink)));
soft_lookupinterfacemethod_node
- = builtin_function ("_Jv_LookupInterfaceMethod",
+ = builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
0, NOT_BUILT_IN, NULL_PTR);
t = tree_cons (NULL_TREE, double_type_node,