summaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-18 13:17:03 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-18 13:17:03 +0000
commite3f8142655cea700176326f8082769f69acebe00 (patch)
tree1f13dfd1858fc89f9b7558e0830a0adc266edb2b /gcc/java/decl.c
parenta03456472202fa8b5097c6ed45e5f083b9097894 (diff)
downloadgcc-e3f8142655cea700176326f8082769f69acebe00.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84894 138bc75d-0d04-0410-961f-82ee72b054a4
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 b0289671992..761ebb2b70c 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