From 9fe2cc05565353eb61325cf3a87f8fc78335d98c Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 20 Feb 2002 11:53:49 -0800 Subject: 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 --- gcc/java/expr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/java/expr.c') 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) { -- cgit v1.1