|
|
@ -72,24 +72,25 @@ public class CompleteSynchronized { |
|
|
|
/* Is there another expression? */ |
|
|
|
/* Is there another expression? */ |
|
|
|
if (!(last.outer instanceof SequentialBlock)) |
|
|
|
if (!(last.outer instanceof SequentialBlock)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
SequentialBlock sequBlock = (SequentialBlock) last.outer; |
|
|
|
|
|
|
|
|
|
|
|
Expression object; |
|
|
|
if (!(sequBlock.subBlocks[0] instanceof InstructionBlock)) |
|
|
|
try { |
|
|
|
return false; |
|
|
|
SequentialBlock sequBlock = (SequentialBlock) last.outer; |
|
|
|
InstructionBlock ib = (InstructionBlock) sequBlock.subBlocks[0]; |
|
|
|
|
|
|
|
|
|
|
|
LocalStoreOperator assign = (LocalStoreOperator) |
|
|
|
|
|
|
|
((InstructionBlock) sequBlock.subBlocks[0]).getInstruction(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (assign.getLocalInfo() != synBlock.local.getLocalInfo()) |
|
|
|
if (!(ib.getInstruction() instanceof StoreInstruction)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
StoreInstruction assign = (StoreInstruction) ib.getInstruction(); |
|
|
|
|
|
|
|
|
|
|
|
object = assign.getSubExpressions()[0]; |
|
|
|
if (!(assign.getLValue() instanceof LocalStoreOperator)) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
LocalStoreOperator lvalue = (LocalStoreOperator) assign.getLValue(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (ClassCastException ex) { |
|
|
|
if (lvalue.getLocalInfo() != synBlock.local.getLocalInfo() |
|
|
|
return false; |
|
|
|
|| assign.getSubExpressions()[1] == null) |
|
|
|
} |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
synBlock.object = object; |
|
|
|
synBlock.object = assign.getSubExpressions()[1]; |
|
|
|
synBlock.moveDefinitions(last.outer,last); |
|
|
|
synBlock.moveDefinitions(last.outer,last); |
|
|
|
last.replace(last.outer); |
|
|
|
last.replace(last.outer); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|