projects
/
repair.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More bug fixes...and debug flags
[repair.git]
/
Repair
/
RepairCompiler
/
MCC
/
IR
/
DotExpr.java
diff --git
a/Repair/RepairCompiler/MCC/IR/DotExpr.java
b/Repair/RepairCompiler/MCC/IR/DotExpr.java
index adc872120c5e865d2d8bcf36c71c512863bb19df..505459f6846caae342d7caf5d34de0a8549beca5 100755
(executable)
--- a/
Repair/RepairCompiler/MCC/IR/DotExpr.java
+++ b/
Repair/RepairCompiler/MCC/IR/DotExpr.java
@@
-13,6
+13,13
@@
public class DotExpr extends Expr {
static boolean DOTYPECHECKS=false;
static boolean DONULL=false;
static boolean DOTYPECHECKS=false;
static boolean DONULL=false;
+
+ public DotExpr(Expr left, String field, Expr index) {
+ this.left = left;
+ this.field = field;
+ this.index = index;
+ }
+
public boolean isSafe() {
if (!left.isSafe())
return false;
public boolean isSafe() {
if (!left.isSafe())
return false;
@@
-28,15
+35,15
@@
public class DotExpr extends Expr {
if (d==fd)
s.add(this);
left.findmatch(d,s);
if (d==fd)
s.add(this);
left.findmatch(d,s);
- if (index!=null)
- index.findmatch(d,s);
+ if (in
tin
dex!=null)
+ in
tin
dex.findmatch(d,s);
}
public Set freeVars() {
Set lset=left.freeVars();
Set iset=null;
}
public Set freeVars() {
Set lset=left.freeVars();
Set iset=null;
- if (index!=null)
- iset=index.freeVars();
+ if (in
tin
dex!=null)
+ iset=in
tin
dex.freeVars();
if (lset==null)
return iset;
if (iset!=null)
if (lset==null)
return iset;
if (iset!=null)
@@
-99,18
+106,12
@@
public class DotExpr extends Expr {
return true;
}
return true;
}
-
- public DotExpr(Expr left, String field, Expr index) {
- this.left = left;
- this.field = field;
- this.index = index;
- }
public Set getRequiredDescriptors() {
Set v = left.getRequiredDescriptors();
public Set getRequiredDescriptors() {
Set v = left.getRequiredDescriptors();
- if (index != null) {
- v.addAll(index.getRequiredDescriptors());
+ if (in
tin
dex != null) {
+ v.addAll(in
tin
dex.getRequiredDescriptors());
}
return v;
}
}
return v;
}
@@
-141,7
+142,6
@@
public class DotExpr extends Expr {
writer.outputline("");
StructureTypeDescriptor struct = (StructureTypeDescriptor) left.getType();
writer.outputline("");
StructureTypeDescriptor struct = (StructureTypeDescriptor) left.getType();
- Expr intindex = index;
Expr offsetbits;
// #ATTN#: getOffsetExpr needs to be called with the fielddescriptor object that is in the vector list
Expr offsetbits;
// #ATTN#: getOffsetExpr needs to be called with the fielddescriptor object that is in the vector list
@@
-311,7
+311,7
@@
public class DotExpr extends Expr {
{
/* finished typechecking...so we can fill the fields in */
{
/* finished typechecking...so we can fill the fields in */
- StructureTypeDescriptor struct = (StructureTypeDescriptor) left.getType();
+ StructureTypeDescriptor struct = (StructureTypeDescriptor) left.getType();
FieldDescriptor fd = struct.getField(field);
LabelDescriptor ld = struct.getLabel(field);
if (ld != null) { /* label */
FieldDescriptor fd = struct.getField(field);
LabelDescriptor ld = struct.getLabel(field);
if (ld != null) { /* label */