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

Peter Wang novalazy at gmail.com
Tue Sep 17 16:59:47 AEST 2013


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.

Peter



More information about the reviews mailing list