private boolean findFixedParameters ( List < Parameter > parameters , Node cur ) { boolean anyMovable = false ; int index = 0 ; while ( cur != null ) { Parameter p ; if ( index >= parameters . size ( ) ) { p = new Parameter ( cur , false ) ; parameters . add ( p ) ; setParameterSideEffectInfo ( p , cur ) ; } else { p = parameters . get ( index ) ; if ( p . shouldRemove ( ) ) { Node value = p . getArg ( ) ; if ( ! cur . isEquivalentTo ( value ) ) { p . setShouldRemove ( false ) ; } else { anyMovable = true ; } } } cur = cur . getNext ( ) ; index ++ ; } for ( ; index < parameters . size ( ) ; index ++ ) { parameters . get ( index ) . setShouldRemove ( false ) ; } return anyMovable ; }
Determine which parameters use the same expression .