projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change naming: use pred/succ rather than parent/child
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
GSS.java
diff --git
a/src/edu/berkeley/sbp/GSS.java
b/src/edu/berkeley/sbp/GSS.java
index
27eb279
..
bf58e64
100644
(file)
--- a/
src/edu/berkeley/sbp/GSS.java
+++ b/
src/edu/berkeley/sbp/GSS.java
@@
-77,15
+77,15
@@
class GSS {
while(!reductionQueue.isEmpty()) {
Reduction r = reductionQueue.poll();
//System.out.println("- " + r);
while(!reductionQueue.isEmpty()) {
Reduction r = reductionQueue.poll();
//System.out.println("- " + r);
- if (r.parentPhase() != null)
- if (r.parentPhase().pos > minPhasePos)
+ if (r.predPhase() != null)
+ if (r.predPhase().pos > minPhasePos)
throw new Error();
r.perform();
throw new Error();
r.perform();
- if (r.parentPhase() != null) {
- if (r.parentPhase().pos < minPhasePos) {
- minPhasePos = r.parentPhase().pos;
+ if (r.predPhase() != null) {
+ if (r.predPhase().pos < minPhasePos) {
+ minPhasePos = r.predPhase().pos;
best = r;
best = r;
- } else if (r.parentPhase().pos == minPhasePos) {
+ } else if (r.predPhase().pos == minPhasePos) {
/*
if (best != null && Parser.mastercache.comparePositions(r.reduction(), best.reduction()) < 0)
throw new Error("\n"+r+"\n"+best+"\n"+
/*
if (best != null && Parser.mastercache.comparePositions(r.reduction(), best.reduction()) < 0)
throw new Error("\n"+r+"\n"+best+"\n"+
@@
-130,8
+130,7
@@
class GSS {
finalResult.merge(r.getForest());
}
if (token == null) continue;
finalResult.merge(r.getForest());
}
if (token == null) continue;
- Result result = new Result(f, null, null);
- result.addParent(n);
+ Result result = new Result(f, n, null);
n.state().invokeShifts(token, this, result);
}
numNewNodes = next==null ? 0 : next.hash.size();
n.state().invokeShifts(token, this, result);
}
numNewNodes = next==null ? 0 : next.hash.size();