Code Generation/Example 1
From Wiki**3
< Code Generation
The Original Code
Consider the following C function: <c> int main() {
int n = 45, i = 0, j = 1, *seg = &i;
while (n-- > 0) {
print(*seg = i + j);
seg = (seg == &i) ? &j : &i;
}
return 0;
} </c>
Postfix Code
The Postfix code for the above function is as follows:
| Postfix code |
|---|
| {{{2}}} |