[project @ 1999-03-02 17:12:54 by sof]
authorsof <unknown>
Tue, 2 Mar 1999 17:12:58 +0000 (17:12 +0000)
committersof <unknown>
Tue, 2 Mar 1999 17:12:58 +0000 (17:12 +0000)
commit94ff1ec1546169fc839b2318c0d141f3089d3e26
tree93fb0e9331b0df9194bd088a8b23b27f266558b4
parentbe2b723f7927ad7927e9d187fd7efda049d6dc77
[project @ 1999-03-02 17:12:54 by sof]
Directories can now be flagged as containing interface files that have
their corresponding object codes living in Win32 DLLs.

The compiler needs to keep track of whether a name refers to something
in a DLL or not, since Win32 DLLs forces you to distinguish between
the two at the point of use. For example, the code generated for
the following snippet

     return (x+2);

will differ. If 'x' resides in a DLL, you need to perform an extra
indirection to get at its value. Effectively, the generated code
becomes

     return (*x+2);

For functions, the distinction can be made transparent, but we
can avoid jumping through an extra level of indirection if we
do indicate that a label will be imported from a DLL.

Back to the renamer and its scheme, directories that contain
the file ".dLL_ifs.hi" (name chosen to lessen the risk of a clash..)
are considered as containing 'DLL interface files'. There's two
caveats to this scheme:

 - interface files found in "." are not considered to be referring
   to something in a DLL.
 - if the compiler has got -static on the command line, then all
   interface file in scope are considered to be 'normal'.
ghc/compiler/rename/ParseIface.y
ghc/compiler/rename/Rename.lhs
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/rename/RnIfaces.lhs
ghc/compiler/rename/RnMonad.lhs
ghc/compiler/rename/RnNames.lhs