[commit: ghc] master: [iserv] Fixing the word size for RemotePtr and toWordArray (7ae4a28)

git at git.haskell.org git at git.haskell.org
Wed Jul 12 12:55:21 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7ae4a28f6a09a0540aab59f5a03fdbcd46a99f17/ghc

>---------------------------------------------------------------

commit 7ae4a28f6a09a0540aab59f5a03fdbcd46a99f17
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Tue Jul 11 20:50:38 2017 -0400

    [iserv] Fixing the word size for RemotePtr and toWordArray
    
    When we load non absolute pathed .so's this usually implies that we
    expect the system to have them in place already, and hence we should not
    need to ship them.  Without the absolute path to the library, we are
    also unable to open and send said library.  Thus we'll do library
    shipping only for libraries with absolute paths.
    
    When dealing with a host and target of different word size (say host
    hast 64bit, target has 32bit), we need to fix the RemotePtr size and the
    toWordArray function, as they are part of the iserv ResolvedBCO binary
    protocol.  This needs to be word size independent.  The choice for
    RemotePtr to 64bit was made to ensure we can store 64bit pointers when
    targeting 64bit. The choice for 32bit word arrays was made wrt.
    encoding/decoding on the potentially slower device.
    
    The efficient serialization code has been graciously provided by
    @bgamari.
    
    Reviewers: bgamari, simonmar, austin, hvr
    
    Reviewed By: bgamari
    
    Subscribers: Ericson2314, rwbarton, thomie, ryantrinkle
    
    Differential Revision: https://phabricator.haskell.org/D3443


>---------------------------------------------------------------

7ae4a28f6a09a0540aab59f5a03fdbcd46a99f17
 compiler/ghci/ByteCodeAsm.hs                   |  2 +-
 compiler/ghci/ByteCodeLink.hs                  | 18 ++----
 compiler/ghci/ByteCodeTypes.hs                 |  2 +-
 libraries/ghci/GHCi/BinaryArray.hs             | 77 ++++++++++++++++++++++++++
 libraries/ghci/GHCi/CreateBCO.hs               | 15 ++++-
 libraries/ghci/GHCi/RemoteTypes.hs             | 12 ++--
 libraries/ghci/GHCi/ResolvedBCO.hs             | 68 +++++++++--------------
 libraries/ghci/ghci.cabal.in                   |  1 +
 testsuite/tests/ghci/should_run/BinaryArray.hs | 29 ++++++++++
 testsuite/tests/ghci/should_run/all.T          |  1 +
 10 files changed, 158 insertions(+), 67 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 7ae4a28f6a09a0540aab59f5a03fdbcd46a99f17


More information about the ghc-commits mailing list