[m-rev.] for review: replace a binop with two unops

Julien Fischer jfischer at opturion.com
Wed Mar 14 10:58:49 AEDT 2018


On Wed, 14 Mar 2018, Zoltan Somogyi wrote:

> For review by anyone.
>
> Use unary ops to access the halves of dwords.
> 
> compiler/builtin_ops.m:
>     Replace the float_word_bits binary op with two unary ops,
>     dword_float_get_word[01]. The unchanged operand represents the address
>     of the double word. The only two values of the deleted operand that
>     made sense were the constants 0 and 1. Replacing the binary op
>     with two unary ops encodes this invariant in the types.
> 
> runtime/mercury_float.h:
>     Define two new macros/functions, MR_dword_float_get_word[01],
>     which get the two halves respectively of a double-word float.
>     These are the implementations of the two new unary ops.
> 
> compiler/bytecode.m:
> compiler/c_util.m:
> compiler/erl_call_gen.m:
> compiler/llds.m:
> compiler/llds_out_data.m:
> compiler/llds_out_instr.m:
> compiler/ml_global_data.m:
> compiler/ml_unify_gen.m:
> compiler/mlds_to_c.m:
> compiler/mlds_to_cs.m:
> compiler/mlds_to_java.m:
> compiler/opt_debug.m:
> compiler/unify_gen.m:
> compiler/var_locn.m:

That looks fine.

Julien.


More information about the reviews mailing list