diff options
author | Crazycolorz5 <Crazycolorz5@gmail.com> | 2019-01-20 19:26:58 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-11 14:12:17 -0500 |
commit | f80c4a66ae219afa7bd4172441f4e94ba649c9d9 (patch) | |
tree | 34c3aa2cc484ade9b2460ca18941763fcb101fcc /rts/LinkerInternals.h | |
parent | 6e47a76a3d0a7b3d424442914478de579a49363c (diff) | |
download | haskell-f80c4a66ae219afa7bd4172441f4e94ba649c9d9.tar.gz |
rts: Specialize hashing at call site rather than in struct.
Separate word and string hash tables on the type level, and do not store
the hashing function. Thus when a different hash function is desire it
is provided upon accessing the table. This is worst case the same as
before the change, and in the majority of cases is better. Also mark the
functions for aggressive inlining to improve performance. {F1686506}
Reviewers: bgamari, erikd, simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #13165
Differential Revision: https://phabricator.haskell.org/D4889
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r-- | rts/LinkerInternals.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 0f47b82761..8a8df50098 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -243,7 +243,7 @@ typedef struct _ObjectCode { /* Holds the list of symbols in the .o file which require extra information.*/ - HashTable *extraInfos; + StrHashTable *extraInfos; #if RTS_LINKER_USE_MMAP == 1 /* The m32 allocators used for allocating small sections and symbol extras @@ -304,12 +304,12 @@ void addSection (Section *s, SectionKind kind, SectionAlloc alloc, void* start, StgWord size, StgWord mapped_offset, void* mapped_start, StgWord mapped_size); -HsBool ghciLookupSymbolInfo(HashTable *table, +HsBool ghciLookupSymbolInfo(StrHashTable *table, const SymbolName* key, RtsSymbolInfo **result); int ghciInsertSymbolTable( pathchar* obj_name, - HashTable *table, + StrHashTable *table, const SymbolName* key, SymbolAddr* data, HsBool weak, @@ -318,7 +318,7 @@ int ghciInsertSymbolTable( /* lock-free version of lookupSymbol */ SymbolAddr* lookupSymbol_ (SymbolName* lbl); -extern /*Str*/HashTable *symhash; +extern StrHashTable *symhash; pathchar* resolveSymbolAddr (pathchar* buffer, int size, |