projects
/
repair.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fixes for parsing sum expressions.
[repair.git]
/
Repair
/
RepairCompiler
/
MCC
/
IR
/
SumExpr.java
diff --git
a/Repair/RepairCompiler/MCC/IR/SumExpr.java
b/Repair/RepairCompiler/MCC/IR/SumExpr.java
index a03338e9dde7b148b76a108a5227cc744c8504d7..34457c3f8d8100453a96bab712b336764d6e73f1 100755
(executable)
--- a/
Repair/RepairCompiler/MCC/IR/SumExpr.java
+++ b/
Repair/RepairCompiler/MCC/IR/SumExpr.java
@@
-17,7
+17,7
@@
public class SumExpr extends Expr {
}
public String name() {
}
public String name() {
- return "sum("+sd.
getSafeSymbol()+"."+rd.getSafeSymbol
()+")";
+ return "sum("+sd.
toString()+"."+rd.toString
()+")";
}
public boolean equals(Map remap, Expr e) {
}
public boolean equals(Map remap, Expr e) {
@@
-39,7
+39,7
@@
public class SumExpr extends Expr {
}
public Descriptor getDescriptor() {
}
public Descriptor getDescriptor() {
- throw new Error();
+ throw new Error(
"Sum shouldn't appear on left hand side!"
);
}
public boolean inverted() {
}
public boolean inverted() {
@@
-59,9
+59,9
@@
public class SumExpr extends Expr {
public void prettyPrint(PrettyPrinter pp) {
pp.output("sum(");
public void prettyPrint(PrettyPrinter pp) {
pp.output("sum(");
- pp.output(sd.
getSafeSymbol
());
+ pp.output(sd.
toString
());
pp.output(".");
pp.output(".");
- pp.output(rd.
getSafeSymbol
());
+ pp.output(rd.
toString
());
pp.output(")");
}
pp.output(")");
}