[project @ 1999-05-26 14:12:07 by simonmar]
[ghc-hetmet.git] / ghc / interpreter / machdep.c
index 7b5bbb2..ebdf4bb 100644 (file)
@@ -12,8 +12,8 @@
  * in the distribution for details.
  *
  * $RCSfile: machdep.c,v $
- * $Revision: 1.3 $
- * $Date: 1999/02/03 17:08:32 $
+ * $Revision: 1.5 $
+ * $Date: 1999/04/27 10:06:55 $
  * ------------------------------------------------------------------------*/
 
 #ifdef HAVE_SIGNAL_H
@@ -233,7 +233,7 @@ static String local hugsdir       Args((Void));
 #if HSCRIPT
 static String local hscriptDir    Args((Void));
 #endif
-static String local RealPath      Args((String));
+//static String local RealPath      Args((String));
 static int    local pathCmp       Args((String, String));
 static String local normPath      Args((String));
 static Void   local searchChr     Args((Int));
@@ -309,7 +309,7 @@ static String local hscriptDir() {  /* directory containing ?? what Daan?  */
 }
 #endif
 
-
+#if 0  /* apparently unused */
 static String local RealPath(s)         /* Find absolute pathname of file  */
 String s; {
 #if HAVE__FULLPATH  /* eg DOS */
@@ -324,6 +324,8 @@ String s; {
 #endif
     return path;
 }
+#endif
+
 
 static int local pathCmp(p1,p2)       /* Compare paths after normalisation */
 String p1;
@@ -622,18 +624,6 @@ String sub; {
 
 
 /* --------------------------------------------------------------------------
- * Get time/date stamp for inclusion in compiled files:
- * ------------------------------------------------------------------------*/
-
-#if PROFILING
-String timeString() {                   /* return time&date string         */
-    time_t clock;                       /* must end with '\n' character    */
-    time(&clock);
-    return(ctime(&clock));
-}
-#endif
-
-/* --------------------------------------------------------------------------
  * Garbage collection notification:
  * ------------------------------------------------------------------------*/
 
@@ -742,9 +732,16 @@ Void gcCStack() {                       /* Garbage collect elements off    */
         fatal("gcCStack");
 #endif
 
-#define StackGrowsDown  while (ptr<=CStackBase) markWithoutMove(*ptr++)
-#define StackGrowsUp    while (ptr>=CStackBase) markWithoutMove(*ptr--)
-#define GuessDirection  if (ptr>CStackBase) StackGrowsUp; else StackGrowsDown
+#define Blargh markWithoutMove(*ptr);
+#if 0
+               markWithoutMove((*ptr)/sizeof(Cell)); \
+               markWithoutMove(( (void*)(*ptr)-(void*)heapTopFst)/sizeof(Cell));  \
+               markWithoutMove(( (void*)(*ptr)-(void*)heapTopSnd)/sizeof(Cell))
+#endif
+
+#define StackGrowsDown  { while (ptr<=CStackBase) { Blargh; ptr++; }; }
+#define StackGrowsUp    { while (ptr>=CStackBase) { Blargh; ptr--; }; }
+#define GuessDirection  if (ptr>CStackBase) StackGrowsUp else StackGrowsDown
 
 #if STACK_DIRECTION > 0
     StackGrowsUp;