An error occurred fetching the project authors.
  1. 23 Jun, 2016 1 commit
    • Boxiang Sun's avatar
      Enable CPython's macro PyCFunction_GET_FUNCTION. Fixes issue #1260 · e6931d60
      Boxiang Sun authored
      The function PyCFunction_GetFunction(func) check func type should be
      exactly PyCFunction_Type. PyCFunction_GET_FUNCTION(func) does not check
      func type. But assumes func layout starts with PyCFunctionObject. i.e.
      for allowing func to be PyCFunction_Type subclass.
      
      This way an extension which subclasses PyCFunctionObject will get
      into trouble using PyCFunction_GET_FUNCTION() on Pyston
      e6931d60
  2. 12 Mar, 2016 1 commit
  3. 12 Feb, 2016 1 commit
    • Marius Wachtler's avatar
      add the cPickle module · f354f1c4
      Marius Wachtler authored
      the module is much faster than the python implementation
      But I had to change the code a little bit because of our GC and more importantly because some of our types have different names etc...
      I also noticed that we failed to to set capifunc.__module__ in a lot of cases which made pickle error
      f354f1c4
  4. 17 Jul, 2015 1 commit
    • Kevin Modzelewski's avatar
      Experimental: speed up calling of capi code · caa5000a
      Kevin Modzelewski authored
      The main capi calling convention is to box all the positional
      arguments into a tuple, and then pass the tuple to PyArg_ParseTuple
      along with a format string that describes how to parse out the
      arguments.
      
      This ends up being pretty wasteful and misses all of the fast
      argument-rearrangement that we are able to JIT out.  These unicode
      functions are particularly egregious, since they use a helper
      function that ends up having to dynamically generate the format
      string to include the function name.
      
      This commit is a very simple change gets some of the common cases:
      in addition to the existing METH_O calling convention ('self' plus
      one positional arg), add the METH_O2 and METH_O3 calling
      conventions.  Plus add METH_D1/D2/D3 as additional flags that can
      be or'd into the calling convention flags, which specify that there
      should some number of default arguments.
      
      This is pretty limited:
      - only handles up to 3 arguments / defaults
      - only handles "O" type specifiers (ie no unboxing of ints)
      - only allows NULL as the default value
      - doesn't give as much diagnostic info on error
      
      The first two could be handled by passing the format string as part
      of the function metadata instead of using it in the function body,
      though this would mean having to add the ability to understand the
      format strings.
      
      The last two issues are tricky from an API perspective since they
      would require a larger change to pass through variable-length data
      structures.
      
      So anyway, punt on those issues for now, and just use the simple
      flag approach.  This cuts the function call overhead by about 4x
      for the functions that it's applied to, which are some common ones:
      string.count, unicode.count, unicode.startswith.
      (endswith, [r]find, and [r]index should all get updated as well)
      caa5000a
  5. 27 May, 2015 2 commits
  6. 21 Apr, 2015 1 commit
  7. 09 Jan, 2015 1 commit
    • Kevin Modzelewski's avatar
      Add "noexcept" specifications to all C API endpoints · 91321622
      Kevin Modzelewski authored
      Add a PYSTON_NOEXCEPT define that gets defined to "noexcept" in C++ mode,
      and to the empty string in C mode.
      
      I don't think 'extern "C"' implies noexcept.
      
      This is partly for better performance when we know that a function cannot throw
      an exception, but also as an annotation for us since the exception model is
      the main difference between C land and Pyston land.
      
      Vim substitution: %s/\(\<PyAPI_FUNC\>(.*).*(\([^)]\|\n\)*)\);/\1 PYSTON_NOEXCEPT;/gc
      - This will catch almost all cases, except for functions not marked with PyAPI_FUNC
        and function definitions that have extra paretheses (in comments, usually)
      91321622
  8. 04 Jan, 2015 1 commit
    • Kevin Modzelewski's avatar
      Rename lib_python/ to from_cpython/ · ef284133
      Kevin Modzelewski authored
      Our previous directory names:
      include/
      lib_python/2.7/
      lib_python/2.7_Modules/
      lib_python/2.7_Objects/
      lib_python/2.7_Python/
      
      new directory names:
      from_cpython/Include/
      from_cpython/Lib/
      from_cpython/Modules/
      from_cpython/Objects/
      from_cpython/Python/
      
      Sorry for the huge diff, but I think this makes way more sense.
      ef284133
  9. 18 Dec, 2014 1 commit
  10. 15 Aug, 2014 1 commit