Looking through the assembler code generated, I noticed something odd. A series of "variable += 1" statements would generate "incl"s, except for the last one, which would generate "movl to eax,incl eax,movl from eax". Inserting additional "variable += 1" statements would simply generate more simple "incl"s. The variables are all global longints. The one that generates the different code is the one just before a procedure call. However, changing "variable += 1" to "Inc(variable)" causes all the statements to generate simple "incl"s. Just wondering if this is normal. Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looking through the assembler code generated, I noticed something odd. A series of "variable += 1" statements would generate "incl"s, except for the last one, which would generate "movl to eax,incl eax,movl from eax". Inserting additional "variable += 1" statements would simply generate more simple "incl"s. The variables are all global longints. The one that generates the different code is the one just before a procedure call. However, changing "variable += 1" to "Inc(variable)" causes all the statements to generate simple "incl"s. Just wondering if this is normal. Thank you.