Changes between Version 31 and Version 32 of IR


Ignore:
Timestamp:
11/23/15 13:16:53 (10 years ago)
Author:
zmanchun
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v31 v32  
    231231 * To translate the C `malloc` you first need to figure out the type of the elements being malloced.  If the argument to malloc is `n`, then you first need to insert an assertion `n%$sizeof(t)==0`, and then `$allocate(h,t,n/$sizeof(t))`.
    232232* Free: `free(p);`
     233* Expression statement: `e;`, where `e` is side effect free except that it might contain error/exception (e.g., array index out of bound, division by zero);
    233234* Noop: `;`
    234235 * **Is there a need to add annotations for "true" or "false" branch, etc.?**  If so, we can just make these parameters to the Noop.