aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-07-18 13:17:03 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-07-18 13:17:03 +0000
commit94cdeb1ad33b77f10f4cbc56bbce5d5f9c6b703c (patch)
tree1f13dfd1858fc89f9b7558e0830a0adc266edb2b /gcc/java/decl.c
parent3d23e0184a2917a9e5b1ef56b7a3c99d6398f08d (diff)
downloadgcc-94cdeb1ad33b77f10f4cbc56bbce5d5f9c6b703c.zip
gcc-94cdeb1ad33b77f10f4cbc56bbce5d5f9c6b703c.tar.gz
gcc-94cdeb1ad33b77f10f4cbc56bbce5d5f9c6b703c.tar.bz2
builtins.c (max_builtin, [...]): Replace calls to build with buildN.
* builtins.c (max_builtin, min_builtin, java_build_function_call_expr): Replace calls to build with buildN. * class.c (build_class_ref, build_static_field_ref, get_dispatch_table, make_class_data, layout_class_method): Likewise. * constants.c (build_ref_from_constant_pool): Likewise. * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method, add_stmt_to_compound): Likewise. * except.c (build_exception_object_ref, expand_end_java_handler): Likewise. * java-gimplify.c (java_gimplify_case_expr, java_gimplify_default_expr, java_gimplify_block, java_gimplify_new_array_init, java_gimplify_try_expr): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * typeck.c (convert_ieee_real_to_integer): Likewise. From-SVN: r84894
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index b028967..761ebb2 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -113,8 +113,7 @@ update_aliases (tree decl, int index)
&& TYPE_MODE (type) == TYPE_MODE (TREE_TYPE (tmp)))
{
tree src = build1 (NOP_EXPR, TREE_TYPE (tmp), decl);
- java_add_stmt
- (build (MODIFY_EXPR, TREE_TYPE (tmp), tmp, src));
+ java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (tmp), tmp, src));
}
tmp = DECL_LOCAL_SLOT_CHAIN (tmp);
}
@@ -139,8 +138,7 @@ push_jvm_slot (int index, tree decl)
/* At the point of its creation this decl inherits whatever
is in the slot. */
tree src = build1 (NOP_EXPR, TREE_TYPE (decl), tmp);
- java_add_stmt
- (build (MODIFY_EXPR, TREE_TYPE (decl), decl, src));
+ java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (decl), decl, src));
break;
}
tmp = DECL_LOCAL_SLOT_CHAIN (tmp);
@@ -1345,7 +1343,7 @@ poplevel (int keep, int reverse, int functionbody)
}
*var = NULL;
- bind = build (BIND_EXPR, TREE_TYPE (block), BLOCK_VARS (block),
+ bind = build3 (BIND_EXPR, TREE_TYPE (block), BLOCK_VARS (block),
BLOCK_EXPR_BODY (block), block);
BIND_EXPR_BODY (bind) = current_binding_level->stmts;
@@ -1800,9 +1798,8 @@ finish_method (tree fndecl)
lock = DECL_ARGUMENTS (fndecl);
BUILD_MONITOR_ENTER (enter, lock);
BUILD_MONITOR_EXIT (exit, lock);
- *tp = build (COMPOUND_EXPR, void_type_node,
- enter,
- build (TRY_FINALLY_EXPR, void_type_node, *tp, exit));
+ *tp = build2 (COMPOUND_EXPR, void_type_node, enter,
+ build2 (TRY_FINALLY_EXPR, void_type_node, *tp, exit));
}
/* Prepend class initialization for static methods reachable from
@@ -1812,11 +1809,11 @@ finish_method (tree fndecl)
&& ! CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (fndecl))))
{
tree clas = DECL_CONTEXT (fndecl);
- tree init = build (CALL_EXPR, void_type_node,
- build_address_of (soft_initclass_node),
- build_tree_list (NULL_TREE, build_class_ref (clas)),
- NULL_TREE);
- *tp = build (COMPOUND_EXPR, TREE_TYPE (*tp), init, *tp);
+ tree init = build3 (CALL_EXPR, void_type_node,
+ build_address_of (soft_initclass_node),
+ build_tree_list (NULL_TREE, build_class_ref (clas)),
+ NULL_TREE);
+ *tp = build2 (COMPOUND_EXPR, TREE_TYPE (*tp), init, *tp);
}
/* Convert function tree to GENERIC prior to inlining. */
@@ -1881,9 +1878,9 @@ add_stmt_to_compound (tree existing, tree type, tree stmt)
return existing;
else if (existing)
{
- tree expr = build (COMPOUND_EXPR, type, existing, stmt);
- TREE_SIDE_EFFECTS (expr)
- = TREE_SIDE_EFFECTS (existing) | TREE_SIDE_EFFECTS (stmt);
+ tree expr = build2 (COMPOUND_EXPR, type, existing, stmt);
+ TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (existing)
+ | TREE_SIDE_EFFECTS (stmt);
return expr;
}
else