From: bdemsky Date: Wed, 12 May 2004 21:40:03 +0000 (+0000) Subject: More bugs... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5fce119f486868de52406c3effb5bed234e29a0a;p=repair.git More bugs... --- diff --git a/Repair/RepairCompiler/MCC/Compiler.java b/Repair/RepairCompiler/MCC/Compiler.java index f10b39d..abdf07c 100755 --- a/Repair/RepairCompiler/MCC/Compiler.java +++ b/Repair/RepairCompiler/MCC/Compiler.java @@ -22,7 +22,7 @@ public class Compiler { public static boolean AGGRESSIVESEARCH=false; public static boolean PRUNEQUANTIFIERS=false; public static boolean GENERATEDEBUGHOOKS=true; - public static boolean GENERATEDEBUGPRINT=true; + public static boolean GENERATEDEBUGPRINT=false; public static void main(String[] args) { State state = null; diff --git a/Repair/RepairCompiler/MCC/IR/UpdateNode.java b/Repair/RepairCompiler/MCC/IR/UpdateNode.java index 397a7a7..060c89e 100755 --- a/Repair/RepairCompiler/MCC/IR/UpdateNode.java +++ b/Repair/RepairCompiler/MCC/IR/UpdateNode.java @@ -419,11 +419,11 @@ class UpdateNode { intindex.generate(cr,indexvd); FieldDescriptor fd=(FieldDescriptor)u.getDescriptor(); StructureTypeDescriptor std=(StructureTypeDescriptor)subexpr.getType(); + Expr offsetbits = std.getOffsetExpr(fd); if (fd instanceof ArrayDescriptor) { fd = ((ArrayDescriptor) fd).getField(); } - Expr offsetbits = std.getOffsetExpr(fd); if (intindex != null) { Expr basesize = fd.getBaseSizeExpr(); offsetbits = new OpExpr(Opcode.ADD, offsetbits, new OpExpr(Opcode.MULT, basesize, intindex)); @@ -444,7 +444,7 @@ class UpdateNode { } else if (rtd==ReservedTypeDescriptor.BIT) { Expr tmp = new OpExpr(Opcode.SHL, offsetbytes, new IntegerLiteralExpr(3)); Expr offset=new OpExpr(Opcode.SUB, offsetbits, tmp); - Expr mask=new OpExpr(Opcode.SHR, new IntegerLiteralExpr(1), offset); + Expr mask=new OpExpr(Opcode.SHL, new IntegerLiteralExpr(1), offset); VarDescriptor maskvar=VarDescriptor.makeNew("mask"); mask.generate(cr,maskvar); cr.outputline("*((char *) "+addr.getSafeSymbol()+")|="+maskvar.getSafeSymbol()+";");