[m-dev.] for review: refactor generation of builtins

Simon Taylor stayl at cs.mu.OZ.AU
Wed Mar 15 10:27:18 AEDT 2000


 
> Estimated hours taken: 4
> 
> Refactor the handling of code generation for builtin
> procedures to avoid code duplication and to reduce
> dependencies between different sub-systems.

> compiler/rl_exprn.m:
> 	Use builtin_ops__translate_builtin rather than
> 	code_util__translate_builtin.


> -		{ error("rl_exprn__maybe_llds_rval_to_rl_rval: invalid llds rval") }
> +		{ error("rl_exprn__maybe_simple_expr_to_rl_rval: invalid llds rval") }

That should probably be changed to 

> +		{ error("rl_exprn__maybe_simple_expr_to_rl_rval: invalid simple_expr") }


> +rl_exprn__simple_expr_to_rl_rval(unary(_UnOp, _Expr), _Code) -->
> +	% XXX is this correct?
> +	{ fail }.

It is. There should probably be a comment:

	% None of the MLDS/LLDS unary builtins are implemented in Aditi.
	% The only one which is returned by builtin_ops__translate_builtin
	% is `bitwise_complement', for which there is no corresponding
	% bytecode in Aditi-RL.

Simon.
--------------------------------------------------------------------------
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