![]() |
||
9. Code flow transformation |
||
|
|
As part of the code-flow transformation, Relogix may move code around or change the sense of comparison operations. Sometimes, in order to untangle complex 'spaghetti' code, it will use Boolean local variables to control the code flow, or duplicate short sections of code. In our example subroutine, the code flow is fairly simple, and Relogix has been able to present the flow in a single do.. while loop and two if statements. It is interesting to note that Relogix has not transformed the loop in our example into a for loop. The reason for this is that the loop counter D0 (ECX in the x86 version) may not contain a positive integer at the start of the loop. In cases where the loop bounds are clear, Relogix would use a for loop for an example like this.
|
Copyright © 2003-4 MicroAPL Ltd