|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2000-2014 JetBrains s.r.o. |
|
|
|
* Copyright 2000-2015 JetBrains s.r.o. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -252,8 +252,7 @@ public class IfHelper { |
|
|
|
|
|
|
|
|
|
|
|
List<Exprent> lstOperands = new ArrayList<Exprent>(); |
|
|
|
List<Exprent> lstOperands = new ArrayList<Exprent>(); |
|
|
|
lstOperands.add(statexpr.getCondition()); |
|
|
|
lstOperands.add(statexpr.getCondition()); |
|
|
|
lstOperands.add(new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, |
|
|
|
lstOperands.add(new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, ifchild.getHeadexprent().getCondition(), null)); |
|
|
|
Arrays.asList(ifchild.getHeadexprent().getCondition()), null)); |
|
|
|
|
|
|
|
statexpr.setCondition(new FunctionExprent(FunctionExprent.FUNCTION_CADD, lstOperands, null)); |
|
|
|
statexpr.setCondition(new FunctionExprent(FunctionExprent.FUNCTION_CADD, lstOperands, null)); |
|
|
|
statexpr.addBytecodeOffsets(ifchild.getHeadexprent().bytecode); |
|
|
|
statexpr.addBytecodeOffsets(ifchild.getHeadexprent().bytecode); |
|
|
|
|
|
|
|
|
|
|
@ -310,8 +309,7 @@ public class IfHelper { |
|
|
|
lstOperands.add(firstif.getHeadexprent().getCondition()); |
|
|
|
lstOperands.add(firstif.getHeadexprent().getCondition()); |
|
|
|
|
|
|
|
|
|
|
|
if (path == 2) { |
|
|
|
if (path == 2) { |
|
|
|
lstOperands.set(0, new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, |
|
|
|
lstOperands.set(0, new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, lstOperands.get(0), null)); |
|
|
|
Arrays.asList(lstOperands.get(0)), null)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lstOperands.add(statexpr.getCondition()); |
|
|
|
lstOperands.add(statexpr.getCondition()); |
|
|
@ -361,7 +359,7 @@ public class IfHelper { |
|
|
|
// negate the if condition
|
|
|
|
// negate the if condition
|
|
|
|
IfExprent statexpr = firstif.getHeadexprent(); |
|
|
|
IfExprent statexpr = firstif.getHeadexprent(); |
|
|
|
statexpr |
|
|
|
statexpr |
|
|
|
.setCondition(new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, Arrays.asList(statexpr.getCondition()), null)); |
|
|
|
.setCondition(new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, statexpr.getCondition(), null)); |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -556,7 +554,7 @@ public class IfHelper { |
|
|
|
|
|
|
|
|
|
|
|
// negate the if condition
|
|
|
|
// negate the if condition
|
|
|
|
IfExprent statexpr = ifstat.getHeadexprent(); |
|
|
|
IfExprent statexpr = ifstat.getHeadexprent(); |
|
|
|
statexpr.setCondition(new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, Arrays.asList(statexpr.getCondition()), null)); |
|
|
|
statexpr.setCondition(new FunctionExprent(FunctionExprent.FUNCTION_BOOL_NOT, statexpr.getCondition(), null)); |
|
|
|
|
|
|
|
|
|
|
|
if (noelsestat) { |
|
|
|
if (noelsestat) { |
|
|
|
StatEdge ifedge = ifstat.getIfEdge(); |
|
|
|
StatEdge ifedge = ifstat.getIfEdge(); |
|
|
|