[m-dev.] diff: add eval_method_uses_table
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jan 28 03:59:32 AEDT 2000
On 26-Jan-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> >> Nope, this centralized test is not what I meant in my previous mail. What
> >> I meant is that *each individual piece of code that examines the eval method*
> >> must contain its own switch on eval method.
> >
> > I don't think that is a good idea; if several places are making the same
> > semantic test, then that code should be abstracted out into a separate
> > predicate, not duplicated.
>
> My point is precisely that they *arent'* making the same semantic test.
...
> I ... think that having just one
> predicate, `eval_method_uses_table', is not the right abstraction even now.
> The code in inlining.m should call `eval_method_cannot_be_inlined', not
> `eval_method_uses_table'; it is just a coincidence that at the moment,
> given the same eval_method the two predicates return the same boolean value.
Well, that would be a reasonable way of doing it; but the current
way of doing it is reasonable too. It's not just coincidence.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list