diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-28 13:41:55 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-28 13:41:55 +0000 |
commit | c9d228b7caffdcdd8753641944c5af49ad360513 (patch) | |
tree | f6ffb6a81a45d1ae93105382f342bf023cae3ccd /gcc/java/class.c | |
parent | 93f85900e6d276be74c6d0a3e649b25cba4abbc7 (diff) | |
download | gcc-c9d228b7caffdcdd8753641944c5af49ad360513.tar.gz |
* java-tree.h (method_entry): Declare. Declare VECs containing it.
(struct lang_type): Change type of otable_methods, atable_methods, and
itable_methods to VECs. Fix comment for atable_methods.
(emit_symbol_table): Take a VEC instead of a tree.
(get_symbol_table_index): Take a VEC * instead of a tree *.
* class.c (add_table_and_syms): Take a VEC instead of a tree.
(emit_symbol_table): Update for changed parameter type.
* expr.c (get_symbol_table_index): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159974 138bc75d-0d04-0410-961f-82ee72b054a4
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, |