This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ecj] Patch: FYI: another quick-stack-flushing patch
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 20 Jun 2006 09:29:49 -0600
- Subject: Re: [ecj] Patch: FYI: another quick-stack-flushing patch
- References: <m3ac88rbh8.fsf@localhost.localdomain> <17559.52368.503857.634692@dell.pink>
- Reply-to: tromey at redhat dot com
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> I suggest just calling flush_quick_stack() every time. It's not worth
Andrew> the sweat worrying about it.
Yeah, good idea. I'm checking in the appended on the gcj-eclipse
branch.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* expr.c (push_value): Always flush quick stack.
Index: expr.c
===================================================================
--- expr.c (revision 114794)
+++ expr.c (working copy)
@@ -304,9 +304,10 @@
/* If the value has a side effect, then we need to evaluate it
whether or not the result is used. If the value ends up on the
quick stack and is then popped, this won't happen -- so we flush
- the quick stack. */
- if (TREE_SIDE_EFFECTS (value) || TREE_CODE (value) == COMPONENT_REF)
- flush_quick_stack ();
+ the quick stack. It is safest to simply always flush, though,
+ since TREE_SIDE_EFFECTS doesn't capture COMPONENT_REF, and for
+ the latter we may need to strip conversions. */
+ flush_quick_stack ();
}
/* Pop a type from the type stack.