diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-12-15 18:57:26 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-15 18:57:53 -0500 |
commit | 0d213c18b6962bb65e2b3035a258dd3f5bf454dd (patch) | |
tree | 6bb856c068bfb7c82584f913701f8d8081ae8482 /compiler/Unique.h | |
parent | cd4b202f24da928adf66c05443b457002ab6a3e1 (diff) | |
download | haskell-0d213c18b6962bb65e2b3035a258dd3f5bf454dd.tar.gz |
UniqSupply: Use full range of machine word
Currently uniques are 32-bits wide. 8 of these bits are for the unique
class, leaving only 24 for the unique number itself. This seems
dangerously small for a large project. Let's use the full range of the
native machine word.
We also add (now largely unnecessary) overflow check to ensure that the
unique number doesn't overflow.
Test Plan: Validate
Reviewers: simonmar, austin, niteria
Reviewed By: niteria
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D2844
GHC Trac Issues: #12944
Diffstat (limited to 'compiler/Unique.h')
-rw-r--r-- | compiler/Unique.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/Unique.h b/compiler/Unique.h new file mode 100644 index 0000000000..a786d8ff3e --- /dev/null +++ b/compiler/Unique.h @@ -0,0 +1,3 @@ +#include "../includes/MachDeps.h" + +#define UNIQUE_BITS (WORD_SIZE_IN_BITS - 8) |