Since a compiler takes statements and emits low-level code for the CPU to use, you have to split apart what is really happening here. It would go something like this:
- Create a memory slot for "i".
- Initialize the memory to zero (normal default behavior).
- Read the value of "i" (which is zero).
- Add 1.
- Store it in "i".