Skip to content
Snippets Groups Projects
  1. Oct 13, 2019
  2. Oct 12, 2019
  3. Oct 04, 2019
  4. Oct 06, 2019
  5. Sep 15, 2019
  6. Sep 08, 2019
    • Yuya Nishihara's avatar
      rust-cpython: move $leaked struct out of macro · 5cb8867c9e2b
      Yuya Nishihara authored
      It wasn't easy to hack the $leaked struct since errors in macro would
      generate lots of compile errors. Let's make it a plain struct so we can
      easily extend it.
      
      PyLeakedRef keeps a more generic PyObject instead of the $name struct
      since it no longer has to call any specific methods implemented by
      the $name class. $leaked parameter in py_shared_iterator!() is kept
      for future change.
      5cb8867c9e2b
  7. Sep 15, 2019
  8. Sep 16, 2019
    • Yuya Nishihara's avatar
      rust-cpython: mark PySharedState as Sync so &'PySharedState can be Send · a1908eb08342
      Yuya Nishihara authored
      The goal is to store &'static PySharedState in $leaked struct, which allows
      us to move the $leaked struct out of the macro. Currently, it depends on
      inner.$data_member(py), which can't be generalized.
      
      PySharedState is Sync because any mutation or read operation is synchronized
      by the Python GIL, py: Python<'a>, which should guarantee that &'PySharedState
      can be sent to another thread.
      a1908eb08342
  9. Sep 14, 2019
    • Yuya Nishihara's avatar
      rust-cpython: move borrow_mut() to PySharedRefCell · 1c675c5fe5fe
      Yuya Nishihara authored
      PySharedRefCell() will host almost all py_shared public functions. This change
      is the first step.
      
      borrow_mut() can be safely implemented since PySharedRefCell knows its inner
      object is managed by its own py_shared_state.
      1c675c5fe5fe
    • Yuya Nishihara's avatar
      rust-cpython: move py_shared_state to PySharedRefCell object · 070a38737334
      Yuya Nishihara authored
      The goal of this series is to encapsulate more "py_shared" thingy and
      reduce the size of the macro, which is hard to debug.
      
      Since py_shared_state manages the borrowing state of the object owned by
      PySharedRefCell, this change makes more sense. If a PyObject has more than
      one data to be leaked into Python world, each PySharedState should incref
      the parent PyObject, and keep track of the corresponding borrowing state.
      070a38737334
  10. Oct 10, 2019
  11. Oct 08, 2019
  12. Oct 05, 2019
  13. Oct 10, 2019
    • Georges Racinet's avatar
      py3-discovery: using plain str in stats dict · 3c6976b1f693
      Georges Racinet authored
      rust-cpython converts automatically from Rust strings to
      the appropriate `str` for the target Python version.
      
      Insisting on discovery stats dict keys to be bytes hence breaks
      the process (this is spotted by test-setdiscovery.t).
      
      Now that byteify-strings has been run on the entire
      codebase, and the import transformer is not there any more,
      the simplest fix is to make the keys plain str again.
      
      Another possible fix would be to forcefully convert to bytes in
      rust-cpython code, but that feels less natural, and would probably
      have to be reverted down the road.
      
      Differential Revision: https://phab.mercurial-scm.org/D7039
      3c6976b1f693
    • Pierre-Yves David's avatar
      perf: fix `perfhelper-mergecopies` report of #changesets · 9d57c2df7b5f
      Pierre-Yves David authored
      Same as `perfhelper-pathcopies`. The previous computation `<base>::<target>` was
      wrong, what we actually need is `::<target> - ::<base>`.
      
      This is now fixed.
      9d57c2df7b5f
  14. Oct 02, 2019
  15. Oct 10, 2019
Loading