[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'.
Showing
- ghc/compiler/rename/ParseIface.y 10 additions, 9 deletionsghc/compiler/rename/ParseIface.y
- ghc/compiler/rename/Rename.lhs 2 additions, 1 deletionghc/compiler/rename/Rename.lhs
- ghc/compiler/rename/RnEnv.lhs 5 additions, 5 deletionsghc/compiler/rename/RnEnv.lhs
- ghc/compiler/rename/RnIfaces.lhs 69 additions, 49 deletionsghc/compiler/rename/RnIfaces.lhs
- ghc/compiler/rename/RnMonad.lhs 76 additions, 19 deletionsghc/compiler/rename/RnMonad.lhs
- ghc/compiler/rename/RnNames.lhs 2 additions, 1 deletionghc/compiler/rename/RnNames.lhs
Loading
Please register or sign in to comment