diff options
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 49299b885cd..f346ad420f7 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1720,11 +1720,11 @@ supers_all_compiled (tree type) static void add_table_and_syms (VEC(constructor_elt,gc) **v, - tree method_slot, + VEC(method_entry,gc) *methods, const char *table_name, tree table_slot, tree table_type, const char *syms_name, tree syms_slot) { - if (method_slot == NULL_TREE) + if (methods == NULL) { PUSH_FIELD_VALUE (*v, table_name, null_pointer_node); PUSH_FIELD_VALUE (*v, syms_name, null_pointer_node); @@ -2886,31 +2886,27 @@ build_symbol_entry (tree decl, tree special) /* Emit a symbol table: used by -findirect-dispatch. */ tree -emit_symbol_table (tree name, tree the_table, tree decl_list, +emit_symbol_table (tree name, tree the_table, + VEC(method_entry,gc) *decl_table, tree the_syms_decl, tree the_array_element_type, int element_size) { - tree method_list, method, table, list, null_symbol; + tree table, list, null_symbol; tree table_size, the_array_type; - int index; + unsigned index; + method_entry *e; /* Only emit a table if this translation unit actually made any references via it. */ - if (decl_list == NULL_TREE) + if (decl_table == NULL) return the_table; /* Build a list of _Jv_MethodSymbols for each entry in otable_methods. */ - index = 0; - method_list = decl_list; - list = NULL_TREE; - while (method_list != NULL_TREE) - { - tree special = TREE_PURPOSE (method_list); - method = TREE_VALUE (method_list); - list = tree_cons (NULL_TREE, build_symbol_entry (method, special), list); - method_list = TREE_CHAIN (method_list); - index++; - } + list = NULL_TREE; + for (index = 0; VEC_iterate (method_entry, decl_table, index, e); index++) + list = tree_cons (NULL_TREE, + build_symbol_entry (e->method, e->special), + list); /* Terminate the list with a "null" entry. */ null_symbol = build_symbol_table_entry (null_pointer_node, |