|
|
@ -131,16 +131,17 @@ public class CreateNewConstructor { |
|
|
|
optDupX2.depth = 0; |
|
|
|
optDupX2.depth = 0; |
|
|
|
|
|
|
|
|
|
|
|
Expression newExpr = new ConstructorOperator |
|
|
|
Expression newExpr = new ConstructorOperator |
|
|
|
(constrCall.getClassType(), constrCall.getMethodType(), |
|
|
|
(constrCall, dup == null); |
|
|
|
dup == null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (constrExpr instanceof ComplexExpression) { |
|
|
|
if (constrExpr instanceof ComplexExpression) { |
|
|
|
Expression[] subs = |
|
|
|
Expression[] subs = |
|
|
|
((ComplexExpression)constrExpr).getSubExpressions(); |
|
|
|
((ComplexExpression)constrExpr).getSubExpressions(); |
|
|
|
for (int i=subs.length - 1; i>=1; i--) |
|
|
|
for (int i=subs.length - 1; i>=1; i--) { |
|
|
|
if (!(subs[i] instanceof NopOperator)) |
|
|
|
if (subs[i] instanceof NopOperator) |
|
|
|
|
|
|
|
break; |
|
|
|
newExpr = newExpr.addOperand(subs[i]); |
|
|
|
newExpr = newExpr.addOperand(subs[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
ic.setInstruction(newExpr); |
|
|
|
ic.setInstruction(newExpr); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|