Fixed random bugs in the runtime.
authorbdemsky <bdemsky>
Fri, 2 Apr 2004 19:29:48 +0000 (19:29 +0000)
committerbdemsky <bdemsky>
Fri, 2 Apr 2004 19:29:48 +0000 (19:29 +0000)
Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc
Repair/RepairCompiler/MCC/Runtime/SimpleHash.h
Repair/RepairCompiler/MCC/Runtime/buildruntime

index 72065716343abc24a4d92343a1098531671dc25f..d420a1c3934481809934c67d073c10c117be9010 100755 (executable)
@@ -74,6 +74,7 @@ int SimpleList::contains(int data) {
 WorkList::WorkList() {
   head=(struct ListNode *) malloc(sizeof(struct ListNode));
   tail=head;
+  head->next=0;
   headoffset=0;
   tailoffset=0;
 }
@@ -126,6 +127,7 @@ void WorkList::add(int id,int type, int lvalue, int rvalue) {
     head->next=(struct ListNode *)malloc(sizeof(struct ListNode));
     headoffset=0;
     head=head->next;
+    head->next=0;
   }
   head->data[headoffset++]=id;
   head->data[headoffset++]=type;
index 50020d87d2d59328f4456a40974b5f7a4fd31a59..e1056f2c5a05b5bc210427b2f8ac0dfe62fec95d 100755 (executable)
@@ -135,11 +135,11 @@ class SimpleIterator {
       if (cur->nextarray==0 &&
          index==table->tailindex)
        return 0;
-      index++;
       if (index==ARRAYSIZE) {
        index=0;
        cur=cur->nextarray;
-      }
+      } else
+       index++;
     }
     if (cur->nodes[index].inuse)
       return 1;
index ca76f74afba62ee54d048186865f71565163ea76..e586517a1308effac8b66095f07efc4f94cc7af4 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
-g++ -c SimpleHash.cc
-g++ -c tmap.cc
-g++ -c instrument.cc
-gcc -c libredblack/redblack.c
\ No newline at end of file
+g++ -g -c SimpleHash.cc
+g++ -g -c tmap.cc
+g++ -g -c instrument.cc
+gcc -g -c libredblack/redblack.c
+gcc -g -c stack.c
+g++ -g -c size.cc
\ No newline at end of file