[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
Showing
- compiler/ghci/ByteCodeAsm.hs 1 addition, 1 deletioncompiler/ghci/ByteCodeAsm.hs
- compiler/ghci/ByteCodeLink.hs 4 additions, 14 deletionscompiler/ghci/ByteCodeLink.hs
- compiler/ghci/ByteCodeTypes.hs 1 addition, 1 deletioncompiler/ghci/ByteCodeTypes.hs
- libraries/ghci/GHCi/BinaryArray.hs 77 additions, 0 deletionslibraries/ghci/GHCi/BinaryArray.hs
- libraries/ghci/GHCi/CreateBCO.hs 12 additions, 3 deletionslibraries/ghci/GHCi/CreateBCO.hs
- libraries/ghci/GHCi/RemoteTypes.hs 5 additions, 7 deletionslibraries/ghci/GHCi/RemoteTypes.hs
- libraries/ghci/GHCi/ResolvedBCO.hs 27 additions, 41 deletionslibraries/ghci/GHCi/ResolvedBCO.hs
- libraries/ghci/ghci.cabal.in 1 addition, 0 deletionslibraries/ghci/ghci.cabal.in
- testsuite/tests/ghci/should_run/BinaryArray.hs 29 additions, 0 deletionstestsuite/tests/ghci/should_run/BinaryArray.hs
- testsuite/tests/ghci/should_run/all.T 1 addition, 0 deletionstestsuite/tests/ghci/should_run/all.T
Loading
Please register or sign in to comment