diff options
author | Per Bothner <per@bothner.com> | 2002-02-20 11:53:49 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2002-02-20 11:53:49 -0800 |
commit | 9fe2cc05565353eb61325cf3a87f8fc78335d98c (patch) | |
tree | ba65439faed48f14d796ca4d44209a8468a5538e /gcc/java/parse.y | |
parent | f67e0d112d28a3caf2ea99b67078e6cb8a851fe8 (diff) | |
download | gcc-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/parse.y')
-rw-r--r-- | gcc/java/parse.y | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index b3e9189..7b900cd 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -10692,14 +10692,10 @@ patch_invoke (patch, method, args) func = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (method)), func); } - if (TREE_CODE (patch) == CALL_EXPR) - patch = build_call_or_builtin (method, func, args); - else - { - TREE_TYPE (patch) = TREE_TYPE (TREE_TYPE (method)); - TREE_OPERAND (patch, 0) = func; - TREE_OPERAND (patch, 1) = args; - } + TREE_TYPE (patch) = TREE_TYPE (TREE_TYPE (method)); + TREE_OPERAND (patch, 0) = func; + TREE_OPERAND (patch, 1) = args; + patch = check_for_builtin (method, patch); original_call = patch; /* We're processing a `new TYPE ()' form. New is called and its |