More efficient, non-allocating unsafeLookupStaticPtr
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Fri, 16 Nov 2018 10:52:11 +0000 (13:52 +0300)
committerÖmer Sinan Ağacan <omeragacan@gmail.com>
Fri, 16 Nov 2018 10:52:33 +0000 (13:52 +0300)
commita50a59a9603425fafb1fac33addb201c19546808
tree228f87fd6e76edf2ec62a402324e47577ab0ed03
parent4efd1b487e10c8cdbc1bca10c45f0887642a5c48
More efficient, non-allocating unsafeLookupStaticPtr

We now allocate the key to spt on C stack rather than in Haskell heap,
avoiding allocating in `unsafeLookupStaticPtr`. This should be slightly
more efficient.

Test Plan: Validated locally

Reviewers: simonmar, hvr, bgamari, erikd

Reviewed By: simonmar

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5333
includes/HsFFI.h
libraries/base/GHC/StaticPtr.hs
rts/StaticPtrTable.c