- 09 Aug, 2015 2 commits
-
-
Kevin Modzelewski authored
We have a couple different ways of walking the C stack (C++ exception unwinding and non-destructing stack crawling), and they both want to do this to reconstruct the Python stack. Extract out the common code.
-
Kevin Modzelewski authored
It had gotten pretty ad hoc. There were two things it was doing - some things dealing with unwinding; moved those to codegen/unwinding.cpp - most of our exception-throwing logic; moved these to a new runtime/exceptions.cpp
-
- 08 Aug, 2015 6 commits
-
-
Kevin Modzelewski authored
Be able to jit functions that throw CAPI exceptions
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
In theory should help with pyxl which throws a decent number of StopIterations from calling generator.next() directly, but pretty few of those calls actually make it into the llvm JIT to benefit from this.
-
Kevin Modzelewski authored
(Not enabled yet)
-
Kevin Modzelewski authored
Our IR doesn't explicitly represent the data transfer between an Invoke statement and its corresponding LandingPad. We use a couple different techniques to pass it through: in the ast interpreter/bjit, we stash it into an interpreter-local variable and then pull it back out. Previous to this change, in the LLVM tier we would pass it directly through an exception, using either the C++ or CAPI exception-passing mechanism. This works but is a pain, since it requires coordination between the invoke and the landingpad. These live in different basic blocks, so we ended up having this other code that lives separate from the normal irgen that has to decide which exception style to use, and it has to respect certain restrictions within irgen (ie it has to be careful to not request CAPI exceptions for cases that we haven't added support for yet). This commit changes the approach so that the exception data is passed directly as LLVM Values, and its up to the Invoke to figure out how to get it into that form. This adds a bit more complexity to the invoke, but it should make the interface easier to extend (such as in the next commit).
-
Kevin Modzelewski authored
Which piggy-back on the integration tests for getting their dependencies.
-
- 07 Aug, 2015 18 commits
-
-
Kevin Modzelewski authored
fix a few generator problems
-
Marius Wachtler authored
this all showed up by running test/cpython/test_generators.py sadly there are still a few until we can run the whole test
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Rewrite unaryop and property get
-
Kevin Modzelewski authored
more capi exceptions
-
Kevin Modzelewski authored
I think we track the dependency correctly in cmake, but distutils doesn't know that the system headers can change from underneath it, so manually specify them as extra dependencies.
-
Kevin Modzelewski authored
Previously, if a CAPI-style callsite tried to call a function but only CXX versions were available (and visa versa), it would bail on rewriting. Now enable CAPI rewrites of CXX functions by using a helper function, and enable CXX rewrites of CAPI functions by just calling checkAndThrowCAPIException like we normally do.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
note: people need to `find -name '*.pyston.so' -delete`, since although I think we correctly know to try to rebuild the sharedmodules, distutils won't end up rebuilding it.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
and friends. Should be pretty much the last step for letting calls go all the way through our runtime using CAPI exceptions.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
add __doc__ attribute to capifunc
-
Kevin Modzelewski authored
Refactor location and names of gc visit functions.
-
- 06 Aug, 2015 10 commits
-
-
Rudi Chen authored
-
Rudi Chen authored
This serves two purposes. 1) Improve naming consistency (follow the format TYPENAME::gcHandler) 2) In the source file, the visit function declaration is closer to the fields of the objects. If a field is added, hopefully it will be easier to remember to update the GC visit function.
-
Rudi Chen authored
-
Kevin Modzelewski authored
Add "doctest" support
-
Boxiang Sun authored
-
Kevin Modzelewski authored
My guess is that there's a build dependency issue, where we try building files that include libunwind.h before we run the rules that generate it. Not sure why we weren't running into that before. But the normal c++ files in src/ correctly depend on libunwind, but the ones in src/runtime/inline don't seem to. For good measure, don't include libunwind.h in our header files, and just use forward-declaring.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
ie what you create either on the repl (where we were close) or with `exec compile(foo, bar, "single")` (where we were not so close). With these changes, doctest seems to mostly be working.
-
Kevin Modzelewski authored
This was stemming from our use of the HEAPTYPE flag for our builtins, and cpython inferring "is builtin" from that. Also, fix a couple other minor things that I ran into.
-
- 05 Aug, 2015 4 commits
-
-
Kevin Modzelewski authored
object.__str__ use capi slot in order to increase compatibility with cpython
-
Marius Wachtler authored
-
Marius Wachtler authored
With this change we print True for: class C(object): pass print C.__str__ is object.__str__ Cheetah depends on this behaviour (see https://bitbucket.org/pypy/compatibility/wiki/cheetah)
-
Marius Wachtler authored
-