This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Gimplifying Java


On Fri, 13 Jun 2003 law@redhat.com wrote:
> How funny -- I was just hashing through this issue with C++ calls which
> throw exceptions.  My gut is telling me that another temporary is in
> order for C++.
>
> Calls store their result into a temporary which is then copied into the
> user variable.  The CALL_EXPR will end a basic block, so the CALL_EXPR
> and assignment to the user variable will be in different basic blocks
> and assignment to the user variable does not occur if the CALL_EXPR
> throws an exception (and because of how we build the CFG the optimizers
> can figure this out trivially).

I see what you mean now, yes this may be the same thing (except
that Andrew may have alluded to real machines; in many ways the tree
optimizers are like a psuedo-machine that can exhibit similar behavior).

The gcj frontend creates a temporary for the assignment, but not in a very
general way.  It seems reasonable that the middle-end ought to handle
this for all languages that can throw exceptions.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]