This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Missed optimization in simple_cst_equal() and has_cleanups()?
- To: egcs at cygnus dot com, grahams at rcp dot co dot uk
- Subject: Re: Missed optimization in simple_cst_equal() and has_cleanups()?
- From: mrs at wrs dot com (Mike Stump)
- Date: Tue, 25 Aug 1998 05:21:00 -0700
> From: grahams@rcp.co.uk
> Date: Mon, 24 Aug 1998 10:44:41 GMT
> To: egcs@cygnus.com
> There are a couple of routines in tree.c (simple_cst_equal,
> has_cleanups) which try to answer a couple of simple
> questions. These routine return either a definative yes/no or a
> "don't know". They return a "don't know" if they encounter a
> language specific tree code.
> If instead of returning "don't know" the question was passed onto
> the language specific code to supply the answer
In general, it was done this way because the primary maintainer at the
time (kenner, rms) didn't understand some of the concepts of object
oriented design. I consider it mostly a legacy issue now. If one
visualizes the code in C++, one realizes this could just be a virtual
function... :-) I don't think the concept of a virtual function is
entirely without merit.