[commit: ghc] master: rts: detabify/dewhitespace AutoApply.h (c71ab57)

git at git.haskell.org git at git.haskell.org
Wed Aug 20 17:32:06 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c71ab572e85ecb0524344e93d96f1b4f42b92826/ghc

>---------------------------------------------------------------

commit c71ab572e85ecb0524344e93d96f1b4f42b92826
Author: Austin Seipp <austin at well-typed.com>
Date:   Wed Aug 20 12:25:24 2014 -0500

    rts: detabify/dewhitespace AutoApply.h
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

c71ab572e85ecb0524344e93d96f1b4f42b92826
 rts/AutoApply.h | 106 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 53 insertions(+), 53 deletions(-)

diff --git a/rts/AutoApply.h b/rts/AutoApply.h
index ee756be..7ad2d79 100644
--- a/rts/AutoApply.h
+++ b/rts/AutoApply.h
@@ -13,67 +13,67 @@
 // ret addr and m arguments taking up n words are on the stack.
 // NB. x is a dummy argument attached to the 'for' label so that
 // BUILD_PAP can be used multiple times in the same function.
-#define BUILD_PAP(m,n,f,x)				\
-    W_ pap;						\
-    W_ size;						\
-    W_ i;						\
-    size = SIZEOF_StgPAP + WDS(n);			\
-    HP_CHK_NP_ASSIGN_SP0(size,f);			\
-    TICK_ALLOC_PAP(size, 0);				\
-    CCCS_ALLOC(size);					\
-    pap = Hp + WDS(1) - size;				\
+#define BUILD_PAP(m,n,f,x)                              \
+    W_ pap;                                             \
+    W_ size;                                            \
+    W_ i;                                               \
+    size = SIZEOF_StgPAP + WDS(n);                      \
+    HP_CHK_NP_ASSIGN_SP0(size,f);                       \
+    TICK_ALLOC_PAP(size, 0);                            \
+    CCCS_ALLOC(size);                                   \
+    pap = Hp + WDS(1) - size;                           \
     SET_HDR(pap, stg_PAP_info, CCCS);                   \
-    StgPAP_arity(pap) = HALF_W_(arity - m);		\
-    StgPAP_fun(pap)   = R1;				\
-    StgPAP_n_args(pap) = HALF_W_(n);			\
-    i = 0;						\
-  for##x:						\
-    if (i < n) {					\
-	StgPAP_payload(pap,i) = Sp(1+i);		\
-	i = i + 1;					\
-	goto for##x;					\
-    }							\
-    R1 = pap;						\
-    Sp_adj(1 + n);					\
+    StgPAP_arity(pap) = HALF_W_(arity - m);             \
+    StgPAP_fun(pap)   = R1;                             \
+    StgPAP_n_args(pap) = HALF_W_(n);                    \
+    i = 0;                                              \
+  for##x:                                               \
+    if (i < n) {                                        \
+        StgPAP_payload(pap,i) = Sp(1+i);                \
+        i = i + 1;                                      \
+        goto for##x;                                    \
+    }                                                   \
+    R1 = pap;                                           \
+    Sp_adj(1 + n);                                      \
     jump %ENTRY_CODE(Sp(0)) [R1];
 
 // Copy the old PAP, build a new one with the extra arg(s)
 // ret addr and m arguments taking up n words are on the stack.
 // NB. x is a dummy argument attached to the 'for' label so that
 // BUILD_PAP can be used multiple times in the same function.
-#define NEW_PAP(m,n,f,x)					\
-     W_ pap;							\
-     W_ new_pap;						\
-     W_ size;							\
-     W_ i;							\
-     pap = R1;							\
-     size = SIZEOF_StgPAP + WDS(TO_W_(StgPAP_n_args(pap))) + WDS(n);	\
-     HP_CHK_NP_ASSIGN_SP0(size,f);				\
-     TICK_ALLOC_PAP(size, 0);					\
-     CCCS_ALLOC(size);						\
-     new_pap = Hp + WDS(1) - size;				\
+#define NEW_PAP(m,n,f,x)                                        \
+     W_ pap;                                                    \
+     W_ new_pap;                                                \
+     W_ size;                                                   \
+     W_ i;                                                      \
+     pap = R1;                                                  \
+     size = SIZEOF_StgPAP + WDS(TO_W_(StgPAP_n_args(pap))) + WDS(n);    \
+     HP_CHK_NP_ASSIGN_SP0(size,f);                              \
+     TICK_ALLOC_PAP(size, 0);                                   \
+     CCCS_ALLOC(size);                                          \
+     new_pap = Hp + WDS(1) - size;                              \
      SET_HDR(new_pap, stg_PAP_info, CCCS);                      \
-     StgPAP_arity(new_pap) = HALF_W_(arity - m);		\
-     W_ n_args;							\
-     n_args = TO_W_(StgPAP_n_args(pap));			\
-     StgPAP_n_args(new_pap) = HALF_W_(n_args + n);		\
-     StgPAP_fun(new_pap) = StgPAP_fun(pap);			\
-     i = 0;							\
-   for1##x:							\
-     if (i < n_args) {						\
-         StgPAP_payload(new_pap,i) = StgPAP_payload(pap,i);	\
-	 i = i + 1;						\
-	 goto for1##x;						\
-     }								\
-     i = 0;							\
-   for2##x:							\
-     if (i < n) {						\
-	 StgPAP_payload(new_pap,n_args+i) = Sp(1+i);		\
-         i = i + 1;						\
-         goto for2##x;						\
-     }								\
-     R1 = new_pap;						\
-     Sp_adj(n+1);						\
+     StgPAP_arity(new_pap) = HALF_W_(arity - m);                \
+     W_ n_args;                                                 \
+     n_args = TO_W_(StgPAP_n_args(pap));                        \
+     StgPAP_n_args(new_pap) = HALF_W_(n_args + n);              \
+     StgPAP_fun(new_pap) = StgPAP_fun(pap);                     \
+     i = 0;                                                     \
+   for1##x:                                                     \
+     if (i < n_args) {                                          \
+         StgPAP_payload(new_pap,i) = StgPAP_payload(pap,i);     \
+         i = i + 1;                                             \
+         goto for1##x;                                          \
+     }                                                          \
+     i = 0;                                                     \
+   for2##x:                                                     \
+     if (i < n) {                                               \
+         StgPAP_payload(new_pap,n_args+i) = Sp(1+i);            \
+         i = i + 1;                                             \
+         goto for2##x;                                          \
+     }                                                          \
+     R1 = new_pap;                                              \
+     Sp_adj(n+1);                                               \
      jump %ENTRY_CODE(Sp(0)) [R1];
 
 // Jump to target, saving CCCS and restoring it on return



More information about the ghc-commits mailing list