shinh / elvm

EsoLangVM Compiler Infrastructure
MIT License
1.13k stars 143 forks source link

Increment/decrement on pointers may be incorrect #79

Open sleirsgoevy opened 4 years ago

sleirsgoevy commented 4 years ago

The compiler always emits ADD A, 1 for the increment operator. This is incorrect if the operand is a pointer to something with size != 1. Although all primitive values in ELVM have size == 1, structures can still have it different.