Mark Mitchell writes:
 >  > 
 > 1. Front ends should build up trees, calling fold only when/if they 
 > want.  For example, in C++, we would want to call fold when we finish 
 > processing an "integral constant expression", which is a term of art in 
 > C++.  (Though that operation would be recursive, that doesn't say 
 > anything about whether or not the code in fold.c must be recursive.  The 
 > C++ front end can always handle the recursion itself, if it so desires.)

There's one other thing to bear in mind when considering the way that
fold relates to language front ends.  We've seen problems in Java
where fold() returned tree nodes that Java didn't recognize: one time,
for example, it returned a BITFIELD_EXPR.

Andrew.

Reply via email to