summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-10-20 15:57:13 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-10-20 16:28:42 -0700
commit89a8d817f0c2951ec305c286a526205d06bf9221 (patch)
tree5295cab951600148bd83f1cae0ae5250816dc257 /includes
parent0202b7cefbaf76dc53d43562dbc84a52debe2eb2 (diff)
downloadhaskell-89a8d817f0c2951ec305c286a526205d06bf9221.tar.gz
Revert "Rename _closure to _static_closure, apply naming consistently."
This reverts commit 35672072b4091d6f0031417bc160c568f22d0469. Conflicts: compiler/main/DriverPipeline.hs
Diffstat (limited to 'includes')
-rw-r--r--includes/Cmm.h1
-rw-r--r--includes/Rts.h1
-rw-r--r--includes/RtsAPI.h12
-rw-r--r--includes/rts/StaticClosures.h34
-rw-r--r--includes/rts/storage/ClosureMacros.h5
-rw-r--r--includes/rts/storage/TSO.h2
-rw-r--r--includes/stg/MiscClosures.h30
7 files changed, 24 insertions, 61 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 1a6ea78ebc..802ab51a5a 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -323,7 +323,6 @@
-------------------------------------------------------------------------- */
#include "rts/Constants.h"
-#include "rts/StaticClosures.h"
#include "DerivedConstants.h"
#include "rts/storage/ClosureTypes.h"
#include "rts/storage/FunTypes.h"
diff --git a/includes/Rts.h b/includes/Rts.h
index 5348e73382..6bf7650f69 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -193,7 +193,6 @@ INLINE_HEADER Time fsecondsToTime (double t)
/* Global constaints */
#include "rts/Constants.h"
-#include "rts/StaticClosures.h"
/* Profiling information */
#include "rts/prof/CCS.h"
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h
index fc7eb26d37..0ba16714e9 100644
--- a/includes/RtsAPI.h
+++ b/includes/RtsAPI.h
@@ -249,15 +249,15 @@ void rts_done (void);
// the base package itself.
//
#if defined(COMPILING_WINDOWS_DLL) && !defined(COMPILING_BASE_PACKAGE)
-__declspec(dllimport) extern StgWord base_GHCziTopHandler_runIO_static_closure[];
-__declspec(dllimport) extern StgWord base_GHCziTopHandler_runNonIO_static_closure[];
+__declspec(dllimport) extern StgWord base_GHCziTopHandler_runIO_closure[];
+__declspec(dllimport) extern StgWord base_GHCziTopHandler_runNonIO_closure[];
#else
-extern StgWord base_GHCziTopHandler_runIO_static_closure[];
-extern StgWord base_GHCziTopHandler_runNonIO_static_closure[];
+extern StgWord base_GHCziTopHandler_runIO_closure[];
+extern StgWord base_GHCziTopHandler_runNonIO_closure[];
#endif
-#define runIO_closure STATIC_CLOSURE(base_GHCziTopHandler_runIO)
-#define runNonIO_closure STATIC_CLOSURE(base_GHCziTopHandler_runNonIO)
+#define runIO_closure base_GHCziTopHandler_runIO_closure
+#define runNonIO_closure base_GHCziTopHandler_runNonIO_closure
/* ------------------------------------------------------------------------ */
diff --git a/includes/rts/StaticClosures.h b/includes/rts/StaticClosures.h
deleted file mode 100644
index e6a00acaa9..0000000000
--- a/includes/rts/StaticClosures.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -----------------------------------------------------------------------------
- *
- * (c) The GHC Team, 1998-2009
- *
- * _closure macros for static closures, which will properly handle
- * indirection.
- *
- * NB: THIS FILE IS INCLUDED IN NON-C CODE AND DATA! #defines only please.
- *
- * To understand the structure of the RTS headers, see the wiki:
- * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
- *
- * ---------------------------------------------------------------------------*/
-
-#ifndef RTS_STATIC_CLOSURES_H
-#define RTS_STATIC_CLOSURES_H
-
-#if CMINUSMINUS
-#define STATIC_CLOSURE(clos) clos ## _static_closure
-#else
-#define STATIC_CLOSURE(clos) (StgClosure*)(&(clos ## _static_closure))
-#endif
-
-#define stg_END_TSO_QUEUE_closure STATIC_CLOSURE(stg_END_TSO_QUEUE)
-#define stg_STM_AWOKEN_closure STATIC_CLOSURE(stg_STM_AWOKEN)
-#define stg_NO_FINALIZER_closure STATIC_CLOSURE(stg_NO_FINALIZER)
-#define stg_dummy_ret_closure STATIC_CLOSURE(stg_dummy_ret)
-#define stg_forceIO_closure STATIC_CLOSURE(stg_forceIO)
-#define stg_END_STM_WATCH_QUEUE_closure STATIC_CLOSURE(stg_END_STM_WATCH_QUEUE)
-#define stg_END_INVARIANT_CHECK_QUEUE_closure STATIC_CLOSURE(stg_END_INVARIANT_CHECK_QUEUE)
-#define stg_END_STM_CHUNK_LIST_closure STATIC_CLOSURE(stg_END_STM_CHUNK_LIST)
-#define stg_NO_TREC_closure STATIC_CLOSURE(stg_NO_TREC)
-
-#endif /* RTS_STATIC_CLOSURES_H */
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h
index ea7905c46f..64e549a641 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -187,12 +187,11 @@ INLINE_HEADER StgClosure *STATIC_LINK2(const StgInfoTable *info,
INTLIKE and CHARLIKE closures.
-------------------------------------------------------------------------- */
-// XXX update me for indirection
INLINE_HEADER P_ CHARLIKE_CLOSURE(int n) {
- return (P_)&stg_CHARLIKE_static_closure[(n)-MIN_CHARLIKE];
+ return (P_)&stg_CHARLIKE_closure[(n)-MIN_CHARLIKE];
}
INLINE_HEADER P_ INTLIKE_CLOSURE(int n) {
- return (P_)&stg_INTLIKE_static_closure[(n)-MIN_INTLIKE];
+ return (P_)&stg_INTLIKE_closure[(n)-MIN_INTLIKE];
}
/* ----------------------------------------------------------------------------
diff --git a/includes/rts/storage/TSO.h b/includes/rts/storage/TSO.h
index ad8dae61c0..6dbcec2595 100644
--- a/includes/rts/storage/TSO.h
+++ b/includes/rts/storage/TSO.h
@@ -252,6 +252,6 @@ void dirty_STACK (Capability *cap, StgStack *stack);
---------------------------------------------------------------------------- */
/* this is the NIL ptr for a TSO queue (e.g. runnable queue) */
-#define END_TSO_QUEUE ((StgTSO *)stg_END_TSO_QUEUE_closure)
+#define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure)
#endif /* RTS_STORAGE_TSO_H */
diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index 9b4949fbd6..6fd7181426 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -25,14 +25,14 @@
# define RTS_FUN_INFO(i) extern W_(i)[]
# define RTS_THUNK_INFO(i) extern W_(i)[]
# define RTS_INFO(i) extern W_(i)[]
-# define RTS_CLOSURE(i) extern W_(i ## _static_closure)[]
+# define RTS_CLOSURE(i) extern W_(i)[]
# define RTS_FUN_DECL(f) extern DLL_IMPORT_RTS StgFunPtr f(void)
#else
# define RTS_RET_INFO(i) extern DLL_IMPORT_RTS const StgRetInfoTable i
# define RTS_FUN_INFO(i) extern DLL_IMPORT_RTS const StgFunInfoTable i
# define RTS_THUNK_INFO(i) extern DLL_IMPORT_RTS const StgThunkInfoTable i
# define RTS_INFO(i) extern DLL_IMPORT_RTS const StgInfoTable i
-# define RTS_CLOSURE(i) extern DLL_IMPORT_RTS StgClosure i ## _static_closure
+# define RTS_CLOSURE(i) extern DLL_IMPORT_RTS StgClosure i
# define RTS_FUN_DECL(f) extern DLL_IMPORT_RTS StgFunPtr f(void)
#endif
@@ -148,25 +148,25 @@ RTS_ENTRY(stg_NO_TREC);
/* closures */
-RTS_CLOSURE(stg_END_TSO_QUEUE);
-RTS_CLOSURE(stg_STM_AWOKEN);
-RTS_CLOSURE(stg_NO_FINALIZER);
-RTS_CLOSURE(stg_dummy_ret);
-RTS_CLOSURE(stg_forceIO);
+RTS_CLOSURE(stg_END_TSO_QUEUE_closure);
+RTS_CLOSURE(stg_STM_AWOKEN_closure);
+RTS_CLOSURE(stg_NO_FINALIZER_closure);
+RTS_CLOSURE(stg_dummy_ret_closure);
+RTS_CLOSURE(stg_forceIO_closure);
-RTS_CLOSURE(stg_END_STM_WATCH_QUEUE);
-RTS_CLOSURE(stg_END_INVARIANT_CHECK_QUEUE);
-RTS_CLOSURE(stg_END_STM_CHUNK_LIST);
-RTS_CLOSURE(stg_NO_TREC);
+RTS_CLOSURE(stg_END_STM_WATCH_QUEUE_closure);
+RTS_CLOSURE(stg_END_INVARIANT_CHECK_QUEUE_closure);
+RTS_CLOSURE(stg_END_STM_CHUNK_LIST_closure);
+RTS_CLOSURE(stg_NO_TREC_closure);
RTS_ENTRY(stg_NO_FINALIZER_entry);
#if IN_STG_CODE
-extern DLL_IMPORT_RTS StgWordArray stg_CHARLIKE_static_closure;
-extern DLL_IMPORT_RTS StgWordArray stg_INTLIKE_static_closure;
+extern DLL_IMPORT_RTS StgWordArray stg_CHARLIKE_closure;
+extern DLL_IMPORT_RTS StgWordArray stg_INTLIKE_closure;
#else
-extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_CHARLIKE_static_closure[];
-extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_INTLIKE_static_closure[];
+extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_CHARLIKE_closure[];
+extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_INTLIKE_closure[];
#endif
/* StgStartup */