From: yeom <yeom>
Date: Fri, 30 Jul 2010 01:00:54 +0000 (+0000)
Subject: changes.
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=582fee5ffa3439b59fbbebb71c616159a253fd3f;p=IRC.git

changes.
---

diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c
index b6b4c88b..4feeb0a9 100644
--- a/Robust/src/Runtime/runtime.c
+++ b/Robust/src/Runtime/runtime.c
@@ -246,9 +246,9 @@ void arraycopy(struct ___Object___ *src, int srcPos, struct ___Object___ *dst, i
 
   if (length<=0)
     return;
-  if (srcPos+length>=srclength)
+  if (srcPos+length>srclength)
     return;
-  if (dstPos+length>=dstlength)
+  if (destPos+length>dstlength)
     return;
 
   unsigned INTPTR *pointer=pointerarray[srctype];
@@ -256,7 +256,7 @@ void arraycopy(struct ___Object___ *src, int srcPos, struct ___Object___ *dst, i
     int elementsize=classsize[srctype];
     int size=length*elementsize;
     //primitives
-    memcpy(((char *)&aodst->___length___)+sizeof(int)+dstPos*elementsize, ((char *)&aosrc->___length___)+sizeof(int)+srcPos*elementsize, size);
+    memcpy(((char *)&aodst->___length___)+sizeof(int)+destPos*elementsize, ((char *)&aosrc->___length___)+sizeof(int)+srcPos*elementsize, size);
   } else {
     //objects
     int i;
@@ -264,13 +264,13 @@ void arraycopy(struct ___Object___ *src, int srcPos, struct ___Object___ *dst, i
       struct ___Object___ * ptr=((struct ___Object___**)(((char*) &aosrc->___length___)+sizeof(int)))[i+srcPos];
       int ptrtype=((int *)ptr)[0];
       //hit an object
-      ((struct ___Object___ **)(((char*) &aodst->___length___)+sizeof(int)))[i+dstPos]=ptr;
+      ((struct ___Object___ **)(((char*) &aodst->___length___)+sizeof(int)))[i+destPos]=ptr;
     }
   }
 }
 
 void CALL35(___System______arraycopy____L___Object____I_L___Object____I_I, int ___srcPos___, int ___destPos___, int ___length___, struct ___Object___ * ___src___, int ___srcPos___, struct ___Object___ * ___dst___, int  ___destPos___, int ___length___) {
-  arraycopy(VAR(___src___), int ___srcPos___, VAR(___dst___), int ___destPos___, int ___length___);
+  arraycopy(VAR(___src___), ___srcPos___, VAR(___dst___), ___destPos___, ___length___);
 }
 #endif
 
diff --git a/Robust/src/Runtime/runtime.h b/Robust/src/Runtime/runtime.h
index 6c8257a7..e1122152 100644
--- a/Robust/src/Runtime/runtime.h
+++ b/Robust/src/Runtime/runtime.h
@@ -105,6 +105,7 @@ void createstartupobject();
 #define CALL23(name, rest, rest2, alt1, alt2, alt3) name(struct name ## _params * ___params___, rest, rest2)
 #define CALL24(name, rest, rest2, alt1, alt2, alt3, alt4) name(struct name ## _params * ___params___, rest, rest2)
 #define CALL34(name, rest, rest2, rest3, alt1, alt2, alt3, alt4) name(struct name ## _params * ___params___, rest, rest2, rest3)
+#define CALL35(name, rest, rest2, rest3, alt1, alt2, alt3, alt4, alt5) name(struct name ## _params * ___params___, rest, rest2, rest3)
 #else
 #define VAR(name) name
 #define CALL00(name) name()
@@ -116,6 +117,7 @@ void createstartupobject();
 #define CALL23(name, rest, rest2, alt1, alt2, alt3) name(alt1, alt2, alt3)
 #define CALL24(name, rest, rest2, alt1, alt2, alt3, alt4) name(alt1, alt2, alt3, alt4)
 #define CALL34(name, rest, rest2, rest3, alt1, alt2, alt3, alt4) name(alt1, alt2, alt3, alt4)
+#define CALL35(name, rest, rest2, rest3, alt1, alt2, alt3, alt4, alt5) name(alt1, alt2, alt3, alt4, alt5)
 #endif
 
 #ifdef TASK