[m-rev.] diff/for review: lookup disjunctions

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Dec 11 14:42:23 AEDT 2006


On Mon, 11 Dec 2006, Zoltan Somogyi wrote:

> Julien: when this diff has been in place for a while without problems,
> we can stop supporting fact tables.

Support for fact tables will need to remain for version 0.14; we can
get rid of them after that.  (After the fork for 0.14 I'll modify
the compiler to emit a warning about using fact tables.)

> For disjunctions in which all disjuncts are just facts, generate code
> that does table lookup.
>
> compiler/disj_gen.m:
> 	Implement lookup disjunctions. The new code based on the code in
> 	lookup_switch.m for generating switches in which some some switch arms
> 	are disjunctions. The code we generate is a specialized version
> 	we would generate for such switch arms.
>
> compiler/lookup_switch.m:
> compiler/lookup_util.m:
> 	Move some predicates from lookup_switch.m to lookup_util.m, to allow
> 	disj_gen.m to call them also.
>
> 	Reorder some argument lists to group related arguments together.
> 	Give some predicates more descriptive names.
>
> 	In lookup_switch.m, improve some comments. In lookup_util.m, avoid
> 	computing ExprnOpts many times.
>
> compiler/switch_gen.m:
> 	Fix some obsolete some comments.
>
> compiler/continuation_info.m:
> 	Provide for a description of the stack slot used by the new code in
> 	disj_gen.m.
>
> compiler/opt_debug.m:
> 	Pass a maybe(proc_label) argument to the predicates that dump rvals
> 	and things that may contain rvals, so that rvals that are code
> 	constants may be printed in the short, user-friendly format
> 	(e.g. local_1, instead of the full, usually very long label name).
> 	This was helpful in debugging the change to disj_gen.m.
>
> 	Remove the old predicates whose sole purpose was to supply a
> 	proc_label for this purpose (e.g. dump_label_for_proc), since now
> 	even the predicates they are based on (e.g. dump_label) can now
> 	be given a proc_label.

That looks fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list