Statechart Implementation : Optimization Algorithms : Inline Default Test

Inline Default Test

MicroC can inline the initial and default test. Consider the following code:

if(currentState_S1 == 0){
currentState_S1 = FS_DefaultOfS1;
} else {...
 
 

The inlined code generated by MicroC is as follows:

if(currentState_S1 == 0 || inState(DefaultOf_S1)){...