summaryrefslogtreecommitdiff
path: root/compiler/utils/Fingerprint.hsc
Commit message (Collapse)AuthorAgeFilesLines
* Clean up handling of known-key Names in interface filesBen Gamari2016-10-131-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously BinIface had some dedicated logic for handling tuple names in the symbol table. As it turns out, this logic was essentially dead code as it was superceded by the special handling of known-key things. Here we cull the tuple code-path and use the known-key codepath for all tuple-ish things. This had a surprising number of knock-on effects, * constraint tuple datacons had to be made known-key (previously they were not) * IfaceTopBndr was changed from being a synonym of OccName to a synonym of Name (since we now need to be able to deserialize Names directly from interface files) * the change to IfaceTopBndr complicated fingerprinting, since we need to ensure that we don't go looking for the fingerprint of the thing we are currently fingerprinting in the fingerprint environment (see notes in MkIface). Handling this required distinguishing between binding and non-binding Name occurrences in the Binary serializers. * the original name cache logic which previously lived in IfaceEnv has been moved to a new NameCache module * I ripped tuples and sums out of knownKeyNames since they introduce a very large number of entries. During interface file deserialization we use static functions (defined in the new KnownUniques module) to map from a Unique to a known-key Name (the Unique better correspond to a known-key name!) When we need to do an original name cache lookup we rely on the parser implemented in isBuiltInOcc_maybe. * HscMain.allKnownKeyNames was folded into PrelInfo.knownKeyNames. * Lots of comments were sprinkled about describing the new scheme. Updates haddock submodule. Test Plan: Validate Reviewers: niteria, simonpj, austin, hvr Reviewed By: simonpj Subscribers: simonmar, niteria, thomie Differential Revision: https://phabricator.haskell.org/D2467 GHC Trac Issues: #12532, #12415
* Delete __GLASGOW_HASKELL__ ifdefs for stage0 < 7.8Thomas Miedema2015-07-211-38/+1
| | | | | | | | | | Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D904
* Add LANGUAGE pragmas to compiler/ source filesHerbert Valerio Riedel2014-05-151-0/+2
| | | | | | | | | | | | | | | | | | In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been reorganized, while following the convention, to - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before any `{-# OPTIONS_GHC #-}`-lines. - Moreover, if the list of language extensions fit into a single `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each individual language extension. In both cases, try to keep the enumeration alphabetically ordered. (The latter layout is preferable as it's more diff-friendly) While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-1/+1
|
* Fix validation failure in Fingerprint.hscAustin Seipp2013-08-231-1/+1
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fingerprint.getFileHash: Fix not reading file at all.Niklas Hambüchen2013-08-231-1/+8
| | | | | | This lead to the stage1 compiler calculating random iface hashes. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fingerprint: Fix comment typoNiklas Hambüchen2013-08-231-1/+1
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Remove trailing whitespace from Fingerprint.hscAustin Seipp2013-08-221-1/+1
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix -Werror failure in Fingerprint.hscAustin Seipp2013-08-221-0/+3
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix interface hashes including time stamp of dependent files.Niklas Hambüchen2013-08-221-2/+29
| | | | | | | | | | | | | | | | | | | | | | | Fixes #8144. Before, the modification time of e.g. #included files (and everything that ends up as a UsageFile, e.g. via addDependentFile) was taken as input for the interface hash of a module. This lead to different hashes for identical inputs on every compilation. We now use file content hashes instead. This changes the interface file format. You will get "Binary.get(Usage): 50" when you try to do an incremental using .hi files that were created with a GHC 7.7 (only) older than this commit. To calculate the md5 hash (`Fingerprint`) of a file in constant space, there now is GHC.Fingerprint.getFileHash, and a fallback version for older GHCs that needs to load the file into memory completely (only used when compiling stage1 with an older GHC). Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Set the way to 'dynamic' when running GHCi if GHCi is dynamically linkedIan Lynagh2013-03-151-0/+1
|
* De-orphan the Outputable Fingerprint instanceIan Lynagh2012-08-051-7/+0
|
* GHC 7.4 is now required for building HEADIan Lynagh2012-07-201-64/+0
|
* Remove a workaround for GHC 6.4.2Ian Lynagh2012-07-161-4/+1
|
* Move -fno-warn-orphan flag into individual modulesIan Lynagh2012-07-151-0/+1
|
* Sync the typeable fingerprinting with baseIan Lynagh2011-07-221-2/+18
|
* omit the local MD5 implementation if we can get it fromSimon Marlow2011-07-121-15/+24
| | | | GHC.Fingerprint in base instead.
* Fix an unused import warningIan Lynagh2009-07-071-1/+0
|
* FIX BUILD with GHC 6.4.xSimon Marlow2008-05-291-1/+4
|
* Use MD5 checksums for recompilation checking (fixes #1372, #1959)Simon Marlow2008-05-281-0/+77
This is a much more robust way to do recompilation checking. The idea is to create a fingerprint of the ABI of an interface, and track dependencies by recording the fingerprints of ABIs that a module depends on. If any of those ABIs have changed, then we need to recompile. In bug #1372 we weren't recording dependencies on package modules, this patch fixes that by recording fingerprints of package modules that we depend on. Within a package there is still fine-grained recompilation avoidance as before. We currently use MD5 for fingerprints, being a good compromise between efficiency and security. We're not worried about attackers, but we are worried about accidental collisions. All the MD5 sums do make interface files a bit bigger, but compile times on the whole are about the same as before. Recompilation avoidance should be a bit more accurate than in 6.8.2 due to fixing #1959, especially when using -O.