[svn:parrot] r47832 - branches/dynop_mapping/src

chromatic chromatic at wgz.org
Fri Jun 25 09:31:39 UTC 2010


On Friday 25 June 2010 at 01:42, plobsing  wrote:

> URL: https://trac.parrot.org/parrot/changeset/47832
> 
> Log:
> fixup pbc_merge to remap ops properly

> Modified: branches/dynop_mapping/src/pbc_merge.c

> @@ -672,10 +740,11 @@
>          }
>  
>          /* Handle special case variable argument opcodes. */
> -        if (op_num == PARROT_OP_set_args_pc    ||
> -                op_num == PARROT_OP_get_results_pc ||
> -                op_num == PARROT_OP_get_params_pc  ||
> -                op_num == PARROT_OP_set_returns_pc) {
> +        op_func = interp->code->op_func_table[op_num];
> +        if (op_func == interp->op_func_table[PARROT_OP_set_args_pc]    ||
> +            op_func == interp->op_func_table[PARROT_OP_get_results_pc] ||
> +            op_func == interp->op_func_table[PARROT_OP_get_params_pc]  ||
> +            op_func == interp->op_func_table[PARROT_OP_set_returns_pc]) {
>              /* Get the signature. */
>              PMC * const sig = bc->const_table->constants[op_ptr[1]]->u.key;

These tend to line up better if you break the line before the || operator, 
such that it aligns vertically with the if.

-- c 


More information about the parrot-dev mailing list