- 12 Feb, 2015 2 commits
-
-
Kevin Modzelewski authored
Before, we tried to do it based on whether the rewrite we were adding was "compatible" with whatever was already in there. But we weren't really doing this and there were a lot of limitations with this method anyway.
-
Kevin Modzelewski authored
This is kind of hacky due to our method of first doing the rewrite, and then picking the slot to rewrite to. This means that at the time that we create the rewrite, we don't know the exact location of the "num_inside" counter, so we have to go back at the end and rewrite it. We could also switch things to pick the rewrite slot first, but that is also complicated but perhaps more subtly, since during the course of the rewrite the chosen slot could have gotten rewritten! This changeset adds this functionality but doesn't use it for anything.
-
- 11 Feb, 2015 6 commits
-
-
Kevin Modzelewski authored
Thanks to @denji for the report!
-
Kevin Modzelewski authored
We weren't scanning it as part of the gc handler, so eventually it would get collected and then __name__ would break. (un)fortunately, in the cases that would use it, it looks like it would always get replaced by another string (the only thing being allocated out of that size bin?), so it would look like the __name__ was just wrong. Anyway, this should fix interp2.py
-
Kevin Modzelewski authored
I'm surprised we got away so long without handling them! Also, it looks like del statements go through full tuple unpacking -- so you can do something like del (l[1], [c.b])
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
So that we have a whole number of pointers to scan. I think there's a bunch more we can do to optimize this situation (do we even need to scan these at all?) but this seems like the simplest way to make this work for now.
-
Kevin Modzelewski authored
Need to unbox-rebox bools like we do for ints and floats.
-
- 10 Feb, 2015 3 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Also, improve rewriting to still be able to rewrite object construction. For now, be able to rewrite the case that a function takes kwargs but the kwargs is empty. Also, add an even faster path to typeCallInternal. This is partially obviated by the improved rewriting, but we might as well keep it.
-
Kevin Modzelewski authored
And add a test that would have caught this specific case. Would be nice if we had some way of verifying these more generally...
-
- 09 Feb, 2015 7 commits
-
-
Kevin Modzelewski authored
I don't think the current implementation will be that fast and will probably do poorly in sort()/sorted() microbenchmarks. My feeling is that it doesn't matter that much, but if it does there are some things we can do to optimize it.
-
Kevin Modzelewski authored
Unwinding: remember the bounds of the interpreter function
-
Marius Wachtler authored
for -I and 'import optparse' this will result in about 5% speedup
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
The InternedString change conflicted with Travis's keyword-params change, since the arg names were switched to InternedStrings. I decided to not intern the param names any more, and instead represent them as llvm::StringRef. Another option would be to intern the builtin ones, even though there's no independent benefit to doing so, since that would let us use InternedStrings more generally. Probably the "best" but most complicated would be to have the StringRef version and then an InternedString version as well that was constructed when needed.
-
- 08 Feb, 2015 1 commit
-
-
Kevin Modzelewski authored
Getset set
-
- 07 Feb, 2015 14 commits
-
-
Kevin Modzelewski authored
Add the '__pyston__' module
-
Kevin Modzelewski authored
-
Marius Wachtler authored
it lets scripts control some of the internal options will be used for interpreter performance tracking
-
Travis Hance authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Also, move exceptions.py since that conflicts
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Travis Hance authored
-
Travis Hance authored
-
Travis Hance authored
-
Kevin Modzelewski authored
moved array.py to array_test.py
-
- 06 Feb, 2015 7 commits
-
-
Travis Hance authored
-
Kevin Modzelewski authored
Previously we were just passing around a vector<> of LineInfos; now, they get encapsulated in a BoxedTraceback object. This has a couple benefits: 1) they can participate in the existing sys.exc_info passing+handling 2) we can enable a basic form of the traceback module. 2 means that we can finally test our tracebacks support, since I was constantly fixing one issue only to break it in another place. 1 means that we now generate the right traceback for the current exception! Before this change, the traceback we would generate was determined using a different system than the exc_info-based exception raising, so sometimes they would diverge and be horribly confusing. There's a pretty big limitation with the current implementation: our tracebacks don't span the right stack frames. In CPython, a traceback spans the stack frames between the raise and the catch, but in Pyston the traceback includes all stack frames. It's not easy to provide this behavior, since the tracebacks are supposed to get updated as they get rethrown through each stack frame. We could do some complicated stuff in irgen to make sure this happens. I think the better but more complicated approach is for us to create the custom exception unwinder we've been wanting. This would let us add custom traceback-handling support as we unwound the stack. Another limitation is that tracebacks are supposed to automatically include a reference to the entire frame stack (tb.tb_frame.f_back.f_back.f_back....). In Pyston, we're not automatically generating those frame objects, so we would either need to do that and take a perf hit, or (more likely?) generate the frame objects on-demand when they're needed. It's not really clear that they're actually needed for traceback objects, so I implemented a different traceback object API and changed the traceback.py library, under the assumption that almost-noone actually deals with the traceback object internals.
-
Kevin Modzelewski authored
builtin functions
-
Kevin Modzelewski authored
Remove -fPIC
-
Travis Hance authored
-
Kevin Modzelewski authored
add the array module
-
Marius Wachtler authored
-