[m-rev.] for review: compile time evaluation of string.count_codepoints

Julien Fischer jfischer at opturion.com
Tue Sep 17 17:02:10 AEST 2013


On Tue, Sep 17, 2013 at 4:59 PM, Peter Wang <novalazy at gmail.com> wrote:

> On Tue, 17 Sep 2013 16:49:15 +1000, Julien Fischer <jfischer at opturion.com>
> wrote:
> > On Tue, Sep 17, 2013 at 4:38 PM, Peter Wang <novalazy at gmail.com> wrote:
> >
> > > On Tue, 17 Sep 2013 02:30:43 +1000 (EST), Julien Fischer <
> > > jfischer at opturion.com> wrote:
> > > >
> > > > For review by anyone.
> > > >
> > > > -----------
> > > >
> > > > Compile time evaluation of string.count_codepoints.
> > > >
> > > > compiler/const_prop.m:
> > > >      Do compile time evaluation of string.count_codepoints where
> > > possible.
> > > >
> > > >      Fix an old error in a comment: functions with two arguments are
> > > >      binary, not unary.
> > > >
> > > > Julien.
> > >
> > > I'm curious about the motivation for this.
> > >
> >
> > Which one, fixing the incorrect comment or doing compile time evaluation
> of
> > count_codepoints?  ;-)
> >
> > There's no really strong motivation other than that I noticed that some
> > code that I was working on
> > G12 would be smaller if we did the above substitution (because it enables
> > further simplifications
> > to take place).
>
> I don't like how brittle the recognition of known procedures is,
> so I suggest not adding to it without good reason.
>

It isn't all that brittle is it?  I don't remember it being particularly
troublesome in the past.

Cheers,
Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20130917/35ff7213/attachment.html>


More information about the reviews mailing list