Re: [CIL users] How to change Binops to function calls?

2013-10-16 Thread Gabriel Kerneis
On Wed, Oct 16, 2013 at 09:19:36PM +0800, tsuletgo wrote: > If you carefully read the definition of CALL instruction, you will > find function can be regarded as an Cil.exp. So it's not difficult to > solve your problem. Take it as a clue. I'm sorry Ting, but what you said makes no sense. Mehrdad

Re: [CIL users] How to change Binops to function calls?

2013-10-16 Thread tsuletgo
Hi, If you carefully read the definition of CALL instruction, you will find function can be regarded as an Cil.exp. So it's not difficult to solve your problem. Take it as a clue. Call of lvaloption * exp * explist * location Ting Ting SU,software institute,East China Normal University tsul

Re: [CIL users] How to change Binops to function calls?

2013-10-16 Thread Gabriel Kerneis
On Wed, Oct 16, 2013 at 12:58:01PM +0330, Mehrdad Abdi wrote: > I want to change all my binary operations to functions. for example > transform expression `b + c * d` to `my_add(b,my_multp(c,d))`. You cannot have nested function calls in CIL. > The problem is function call is a instruction and b

[CIL users] How to change Binops to function calls?

2013-10-16 Thread Mehrdad Abdi
Hi. I want to change all my binary operations to functions. for example transform expression `b + c * d` to `my_add(b,my_multp(c,d))`. The problem is function call is a instruction and binop is a expression. How can I do this transform by a visitor? thanks. --- and a suggestion: create a `C-IL