Commit c01dc71d authored by panne's avatar panne
Browse files

[project @ 2000-02-22 12:45:30 by panne]

Space leak paranoia: Don't keep whole InterfaceDetails alive
throughout the middle part of the compiler
parent b310c854
...@@ -20,6 +20,7 @@ import Lex ( PState(..), P, ParseResult(..) ) ...@@ -20,6 +20,7 @@ import Lex ( PState(..), P, ParseResult(..) )
import SrcLoc ( mkSrcLoc ) import SrcLoc ( mkSrcLoc )
import Rename ( renameModule ) import Rename ( renameModule )
import RnMonad ( InterfaceDetails(..) )
import MkIface ( startIface, ifaceDecls, endIface ) import MkIface ( startIface, ifaceDecls, endIface )
import TcModule ( TcResults(..), typecheckModule ) import TcModule ( TcResults(..), typecheckModule )
...@@ -123,7 +124,8 @@ doIt (core_cmds, stg_cmds) ...@@ -123,7 +124,8 @@ doIt (core_cmds, stg_cmds)
reportCompile mod_name "Compilation NOT required!" >> reportCompile mod_name "Compilation NOT required!" >>
return (); return ();
Just (this_mod, rn_mod, iface_file_stuff, rn_name_supply, imported_modules) -> Just (this_mod, rn_mod, iface_file_stuff@(InterfaceDetails _ _ _ deprecations),
rn_name_supply, imported_modules) ->
-- Oh well, we've got to recompile for real -- Oh well, we've got to recompile for real
...@@ -187,8 +189,8 @@ doIt (core_cmds, stg_cmds) ...@@ -187,8 +189,8 @@ doIt (core_cmds, stg_cmds)
-- thoroughout code generation -- thoroughout code generation
ifaceDecls if_handle local_tycons local_classes inst_info ifaceDecls if_handle local_tycons local_classes inst_info
final_ids tidy_binds imp_rule_ids iface_file_stuff >> final_ids tidy_binds imp_rule_ids deprecations >>
endIface if_handle >> endIface if_handle >>
-- We are definitely done w/ interface-file stuff at this point: -- We are definitely done w/ interface-file stuff at this point:
-- (See comments near call to "startIface".) -- (See comments near call to "startIface".)
......
...@@ -90,7 +90,7 @@ ifaceDecls :: Maybe Handle ...@@ -90,7 +90,7 @@ ifaceDecls :: Maybe Handle
-> [Id] -- Ids used at code-gen time; they have better pragma info! -> [Id] -- Ids used at code-gen time; they have better pragma info!
-> [CoreBind] -- In dependency order, later depend on earlier -> [CoreBind] -- In dependency order, later depend on earlier
-> [ProtoCoreRule] -- Rules -> [ProtoCoreRule] -- Rules
-> InterfaceDetails -> [Deprecation Name]
-> IO () -> IO ()
endIface :: Maybe Handle -> IO () endIface :: Maybe Handle -> IO ()
...@@ -127,7 +127,7 @@ ifaceDecls (Just hdl) ...@@ -127,7 +127,7 @@ ifaceDecls (Just hdl)
final_ids final_ids
binds binds
orphan_rules -- Rules defined locally for an Id that is *not* defined locally orphan_rules -- Rules defined locally for an Id that is *not* defined locally
(InterfaceDetails _ _ _ deprecations) deprecations
| null_decls = return () | null_decls = return ()
-- You could have a module with just (re-)exports/instances in it -- You could have a module with just (re-)exports/instances in it
| otherwise | otherwise
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment