RTS tidyup sweep, first phase
[ghc-hetmet.git] / includes / rts / storage / Closures.h
similarity index 97%
rename from includes/Closures.h
rename to includes/rts/storage/Closures.h
index eb5d1ed..6e06e57 100644 (file)
@@ -6,8 +6,8 @@
  *
  * -------------------------------------------------------------------------- */
 
-#ifndef CLOSURES_H
-#define CLOSURES_H
+#ifndef RTS_STORAGE_CLOSURES_H
+#define RTS_STORAGE_CLOSURES_H
 
 /*
  * The Layout of a closure header depends on which kind of system we're
@@ -51,14 +51,14 @@ typedef struct {
    -------------------------------------------------------------------------- */
 
 typedef struct {
-    const struct _StgInfoTable* info;
+    const StgInfoTable* info;
 #ifdef PROFILING
     StgProfHeader         prof;
 #endif
 } StgHeader;
 
 typedef struct {
-    const struct _StgInfoTable* info;
+    const StgInfoTable* info;
 #ifdef PROFILING
     StgProfHeader         prof;
 #endif
@@ -77,10 +77,10 @@ typedef struct {
 
 /* All closures follow the generic format */
 
-struct StgClosure_ {
+typedef struct StgClosure_ {
     StgHeader   header;
     struct StgClosure_ *payload[FLEXIBLE_ARRAY];
-};
+} *StgClosurePtr; // StgClosure defined in Rts.h
 
 typedef struct {
     StgThunkHeader  header;
@@ -124,7 +124,7 @@ typedef struct {
     StgHeader     header;
     StgClosure   *indirectee;
     StgClosure   *static_link;
-    struct _StgInfoTable *saved_info;
+    StgInfoTable *saved_info;
 } StgIndStatic;
 
 typedef struct {
@@ -273,7 +273,7 @@ typedef struct {
    -------------------------------------------------------------------------- */
 
 typedef struct {
-    const struct _StgInfoTable* info;
+    const StgInfoTable* info;
     StgWord        liveness;
     StgWord        ret_addr;
     StgClosure *   payload[FLEXIBLE_ARRAY];
@@ -287,7 +287,7 @@ typedef struct {
  * The stack frame size is also cached in the frame for convenience.
  */
 typedef struct {
-    const struct _StgInfoTable* info;
+    const StgInfoTable* info;
     StgWord        size;
     StgClosure *   fun;
     StgClosure *   payload[FLEXIBLE_ARRAY];
@@ -414,4 +414,4 @@ typedef struct {
   StgClosure    *alt_code;
 } StgCatchRetryFrame;
 
-#endif /* CLOSURES_H */
+#endif /* RTS_STORAGE_CLOSURES_H */