Language-independent functions-as-trees representation

Jason Merrill jason@redhat.com
Fri Aug 23 08:46:00 GMT 2002


On Fri, 23 Aug 2002 17:21:58 +0200, Pop Sébastian <pop@gauvain.u-strasbg.fr> wrote:

> On Fri, Aug 23, 2002 at 01:41:28PM +0100, Jason Merrill wrote:

> But we have to try to implement some trivial optimisations in order
> to see what tools we'll need further.

Certainly.  But I'd like to get away from dealing with SCOPE_STMT as
quickly as possible.

> Another example is the problem on which I stopped to develop an
> improvement for the switch to binary search : I just needed a vector of
> CASE_LABELs on which I need a simple fast sorting based on the value of
> the CASE_LABEL.

We could certainly add such a field to the SWITCH_EXPR.  Say
SWITCH_EXPR_VALUES, which is either NULL_TREE or a TREE_VEC of
CASE_LABEL_EXPRs.

> vector<tree> then a simple std::sort (), or even better:
> vector<case_label> :-)

Using qsort() isn't *that* horrible.  :)

Jason



More information about the Gcc mailing list