small differences
authorbdemsky <bdemsky>
Tue, 20 Oct 2009 00:47:56 +0000 (00:47 +0000)
committerbdemsky <bdemsky>
Tue, 20 Oct 2009 00:47:56 +0000 (00:47 +0000)
Robust/src/ClassLibrary/gnu/Double.java
Robust/src/Runtime/STM/delaycomp.h
Robust/src/Runtime/runtime.c
Robust/src/Runtime/thread.c

index 19f50841a82cc5868ec4bad5619eaf196c15e67a..93ab44cac15de21529afcf8853ea59f5892a0259 100644 (file)
@@ -287,7 +287,7 @@ public final class Double extends Number //implements Comparable<Double>
   }
 
   public static native double nativeparsedouble(String str);
-
+    public static native double nativeparsedouble(byte[] str, int start, int length);
 
   /**
    * Return <code>true</code> if the <code>double</code> has the same
index fcf081a67830d9af418a44141f8304aed0fb148b..3b9c980d443a1f8cd70d637e9ba5fa2aa365829d 100644 (file)
@@ -15,7 +15,7 @@ struct pointerlist {
   void * prev;
   void * array[MAXPOINTERS];
   int maxcount;
-  void * buffer[1024];
+  int buffer[2048];
 };
 
 struct primitivelist {
index f914431e6aae9e2b57973fa5a5c6a5686777a73a..142e1204299a04799632a0c1cc3b33acc04356df 100644 (file)
@@ -140,6 +140,21 @@ double CALL01(___Double______nativeparsedouble____L___String___,struct ___String
 }
 #endif
 
+#ifdef D___Double______nativeparsedouble_____AR_B_I_I 
+double CALL23(___Double______nativeparsedouble_____AR_B_I_I, int start, int length,int start,int length,struct ArrayObject * ___str___) {
+  int maxlength=(length>60)?60:length;
+  char str[maxlength+1];
+  struct ArrayObject * bytearray=VAR(___str___);
+  int i;
+  for(i=0; i<maxlength; i++) {
+    str[i]=(((char *)&bytearray->___length___)+sizeof(int))[i+start];
+  }
+  str[i]=0;
+  double d=atof(str);
+  return d;
+}
+#endif
+
 #ifdef D___String______convertdoubletochar____D__AR_C
 int CALL12(___String______convertdoubletochar____D__AR_C, double ___val___, double ___val___, struct ArrayObject ___chararray___) {
   int length=VAR(___chararray___)->___length___;
index 3632b3612d2364132ab123ae59ae08e7cbc9c9f4..47704013a92fada38f2c742de698590a999c76b8 100644 (file)
@@ -202,7 +202,7 @@ void initializethreads() {
 #ifdef STMARRAY
   arraystack.count=0;
 #endif
-  int a=mprotect((downpage(&ptrstack.buffer[0])), 4096, PROT_NONE);
+  int a=mprotect((downpage(&ptrstack.buffer[1024])), 4096, PROT_NONE);
   if (a==-1)
     perror("ptrstack");
   a=mprotect(downpage(&primstack.array[MAXVALUES]), 4096, PROT_NONE);
@@ -303,7 +303,7 @@ void initthread(struct ___Thread___ * ___this___) {
 #ifdef STMARRAY
   arraystack.count=0;
 #endif
-  int a=mprotect(downpage(&ptrstack.buffer[0]), 4096, PROT_NONE);
+  int a=mprotect(downpage(&ptrstack.buffer[1024]), 4096, PROT_NONE);
   if (a==-1)
     perror("ptrstack");
   a=mprotect(downpage(&primstack.array[MAXVALUES]), 4096, PROT_NONE);
@@ -374,6 +374,14 @@ void CALL00(___Thread______yield____) {
 }
 #endif
 
+#ifdef D___Thread______abort____
+void CALL00(___Thread______abort____) {
+#ifdef SANDBOX
+  _longjmp(aborttrans,1);
+#endif
+}
+#endif
+
 #ifdef DSTM
 #ifdef RECOVERY
 // return if the machine is dead