projects
/
repair.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a3fc53
)
Worklist items from a previous model build stay in the worklist...this causes lots...
author
bdemsky
<bdemsky>
Wed, 19 May 2004 05:48:34 +0000
(
05:48
+0000)
committer
bdemsky
<bdemsky>
Wed, 19 May 2004 05:48:34 +0000
(
05:48
+0000)
Repair/RepairCompiler/MCC/IR/RepairGenerator.java
patch
|
blob
|
history
Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc
patch
|
blob
|
history
Repair/RepairCompiler/MCC/Runtime/SimpleHash.h
patch
|
blob
|
history
diff --git
a/Repair/RepairCompiler/MCC/IR/RepairGenerator.java
b/Repair/RepairCompiler/MCC/IR/RepairGenerator.java
index 1114e1af8876f682a4271289113db61aad282eb8..f0acb61f85864c7dd568b242b78fe09d40287de6 100755
(executable)
--- a/
Repair/RepairCompiler/MCC/IR/RepairGenerator.java
+++ b/
Repair/RepairCompiler/MCC/IR/RepairGenerator.java
@@
-479,6
+479,7
@@
public class RepairGenerator {
craux.outputline("while (1)");
craux.startblock();
craux.outputline(name+ " * "+newmodel.getSafeSymbol()+"=new "+name+"();");
craux.outputline("while (1)");
craux.startblock();
craux.outputline(name+ " * "+newmodel.getSafeSymbol()+"=new "+name+"();");
+ craux.outputline(worklist.getSafeSymbol()+"->reset();");
}
private void generate_teardown() {
}
private void generate_teardown() {
diff --git
a/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc
b/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc
index bed5c1fc3ad9780c35dd042784ef874c016e9441..c1579f22fe40dbe70ff1ef16943679dec9273624 100755
(executable)
--- a/
Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc
+++ b/
Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc
@@
-79,6
+79,12
@@
WorkList::WorkList() {
tailoffset=0;
}
tailoffset=0;
}
+void WorkList::reset() {
+ head=tail;
+ headoffset=0;
+ tailoffset=0;
+}
+
int WorkList::hasMoreElements() {
// return (ptr != 0);
return ((head!=tail)||(headoffset!=tailoffset));
int WorkList::hasMoreElements() {
// return (ptr != 0);
return ((head!=tail)||(headoffset!=tailoffset));
@@
-124,10
+130,12
@@
void WorkList::pop() {
void WorkList::add(int id,int type, int lvalue, int rvalue) {
if (headoffset==WLISTSIZE) {
void WorkList::add(int id,int type, int lvalue, int rvalue) {
if (headoffset==WLISTSIZE) {
- head->next=(struct ListNode *)malloc(sizeof(struct ListNode));
+ if (head->next==0) {
+ head->next=(struct ListNode *)malloc(sizeof(struct ListNode));
+ head->next=0;
+ }
headoffset=0;
head=head->next;
headoffset=0;
head=head->next;
- head->next=0;
}
head->data[headoffset++]=id;
head->data[headoffset++]=type;
}
head->data[headoffset++]=id;
head->data[headoffset++]=type;
diff --git
a/Repair/RepairCompiler/MCC/Runtime/SimpleHash.h
b/Repair/RepairCompiler/MCC/Runtime/SimpleHash.h
index 0823fd4ed91c6cafc01206991d8dc7f14cacdab4..eda2467867eb7eae2d1a6ee90970434049eca46f 100755
(executable)
--- a/
Repair/RepairCompiler/MCC/Runtime/SimpleHash.h
+++ b/
Repair/RepairCompiler/MCC/Runtime/SimpleHash.h
@@
-46,6
+46,7
@@
private:
public:
WorkList();
~WorkList();
public:
WorkList();
~WorkList();
+ void reset();
void add(int id, int type, int lvalue, int rvalue);
int hasMoreElements();
int getid();
void add(int id, int type, int lvalue, int rvalue);
int hasMoreElements();
int getid();