aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2002-02-20 11:53:49 -0800
committerPer Bothner <bothner@gcc.gnu.org>2002-02-20 11:53:49 -0800
commit9fe2cc05565353eb61325cf3a87f8fc78335d98c (patch)
treeba65439faed48f14d796ca4d44209a8468a5538e /gcc/java/expr.c
parentf67e0d112d28a3caf2ea99b67078e6cb8a851fe8 (diff)
downloadgcc-9fe2cc05565353eb61325cf3a87f8fc78335d98c.zip
gcc-9fe2cc05565353eb61325cf3a87f8fc78335d98c.tar.gz
gcc-9fe2cc05565353eb61325cf3a87f8fc78335d98c.tar.bz2
builtins.c (check_for_builtin): New function.
* builtins.c (check_for_builtin): New function. (build_call_or_builtin): Remove. * java-tree.h: Update accordingly. * expr.c (expand_invoke): Use build + check_for_builtin instead of build_call_or_builtin. * parse.y (patch_invoke): Likewise. This avoids needlessly creating a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER flag (which had caused jcf-write to incorrectly emit invokevirtual). From-SVN: r49909
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index a7cb59e..0459310 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2112,7 +2112,9 @@ expand_invoke (opcode, method_ref_index, nargs)
}
func = build1 (NOP_EXPR, build_pointer_type (method_type), func);
- call = build_call_or_builtin (method, func, arg_list);
+ call = build (CALL_EXPR, TREE_TYPE (method_type), func, arg_list, NULL_TREE);
+ TREE_SIDE_EFFECTS (call) = 1;
+ call = check_for_builtin (method, call);
if (check != NULL_TREE)
{