summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2019-01-20 19:25:26 -0500
committerJohn Ericson <git@JohnEricson.me>2019-07-13 23:01:04 -0400
commitf57616ff540fcc45da3eff03dadcb81e76bbdb15 (patch)
tree405a4386da344280bc4bf8929e80bc88c15ccf48 /compiler
parentcf6c2b8023e843bf04d6c8b031e2ac1306658bf7 (diff)
downloadhaskell-wip/D5082.tar.gz
Use run-time tablesNextToCode in compiler exclusively (#15548)wip/D5082
Summary: - There is no more use of the TABLES_NEXT_TO_CODE CPP macro in `compiler/`. GHCI_TABLES_NEXT_TO_CODE is also removed entirely. The field within `PlatformMisc` within `DynFlags` is used instead. - The field is still not exposed as a CLI flag. We might consider some way to ensure the right RTS / libraries are used before doing that. Original reviewers: Original subscribers: TerrorJack, rwbarton, carter Original Differential Revision: https://phabricator.haskell.org/D5082
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghc.mk8
-rw-r--r--compiler/ghci/ByteCodeItbls.hs4
-rw-r--r--compiler/utils/Util.hs8
3 files changed, 3 insertions, 17 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 70765011b8..6e1d7ca761 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -272,14 +272,6 @@ endif
ifeq "$(GhcWithInterpreter)" "YES"
compiler_stage2_CONFIGURE_OPTS += --flags=ghci
-ifeq "$(TablesNextToCode)" "YES"
-# Should GHCI be building info tables in the TABLES_NEXT_TO_CODE style
-# or not?
-# XXX This should logically be a CPP option, but there doesn't seem to
-# be a flag for that
-compiler_stage2_CONFIGURE_OPTS += --ghc-option=-DGHCI_TABLES_NEXT_TO_CODE
-endif
-
# Should the debugger commands be enabled?
ifeq "$(GhciWithDebugger)" "YES"
compiler_stage2_CONFIGURE_OPTS += --ghc-option=-DDEBUGGER
diff --git a/compiler/ghci/ByteCodeItbls.hs b/compiler/ghci/ByteCodeItbls.hs
index 7381c8f926..c17f213365 100644
--- a/compiler/ghci/ByteCodeItbls.hs
+++ b/compiler/ghci/ByteCodeItbls.hs
@@ -71,6 +71,8 @@ make_constr_itbls hsc_env cons =
descr = dataConIdentity dcon
- r <- iservCmd hsc_env (MkConInfoTable ptrs' nptrs_really
+ tables_next_to_code = tablesNextToCode dflags
+
+ r <- iservCmd hsc_env (MkConInfoTable tables_next_to_code ptrs' nptrs_really
conNo (tagForCon dflags dcon) descr)
return (getName dcon, ItblPtr r)
diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs
index aa4afa5451..4a2fdc586b 100644
--- a/compiler/utils/Util.hs
+++ b/compiler/utils/Util.hs
@@ -11,7 +11,6 @@
module Util (
-- * Flags dependent on the compiler build
ghciSupported, debugIsOn, ncgDebugIsOn,
- ghciTablesNextToCode,
isWindowsHost, isDarwinHost,
-- * General list processing
@@ -205,13 +204,6 @@ ncgDebugIsOn = True
ncgDebugIsOn = False
#endif
-ghciTablesNextToCode :: Bool
-#if defined(GHCI_TABLES_NEXT_TO_CODE)
-ghciTablesNextToCode = True
-#else
-ghciTablesNextToCode = False
-#endif
-
isWindowsHost :: Bool
#if defined(mingw32_HOST_OS)
isWindowsHost = True