- 23 Jul, 2015 5 commits
-
-
Kevin Modzelewski authored
- rewriting a runtimeCall of an instancemethod was broken (this is a separate code path from the much-more-common callattr form). - we don't need to guard on the this->cls as often in Box::getattr, specifically in cases that are coming from typeLookup. Not because the classes are fixed (I think they can change), but because they are not allowed to change in a way that would change what Box::getattr has the guard for (guarding on attrs_offset and tp_dictoffset). - slightly change the place we guard on tp_getattro and tp_getattr to a place I think is a bit more correct (or at least easier to understand as being correct).
-
Kevin Modzelewski authored
ie the way that __getattr__ ends up getting called. Two main optimizations: - switch the initial attribute access (ie checking to see the attribute exists before calling __getattr__) to use a non-throwing api. For the typical case, even though the throwing would be a C API throw, the construction of the AttributeError is relatively expensive, and the object would be immediately discarded anyway. - add rewriting to the function They both roughly cut out half the overhead of accessing attributes on classes with __getattr__.
-
Kevin Modzelewski authored
Improve isinstance speed
-
Kevin Modzelewski authored
Make sure to intern attribute string in PyObject_SetAttr.
-
Chris Toshok authored
Handle the extensive edge cases related to sequence slicing
-
- 22 Jul, 2015 26 commits
-
-
Kevin Modzelewski authored
bjit: omit frame pointer + use R12 for ASTInterpreter*
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
isinstance(obj, cls) needs to do a bunch of dynamic checking: it needs to check cls's class to see if it defines __instancecheck__, and it needs to fetch __class__ on obj. Most of those time those aren't overridden, so __instancecheck__ gets skipped and __class__ returns the type of the object. So use the same "type slot" machinery to cache whether an __instancecheck__ or custom __class__ attribute have gotten added. These are a bit different than the other slots since they are not "wrappers", they are simply bools that say whether or not the attribute exists. This makes the slot handling code a bit messier / more divergent from CPython, but I think it still makes sense to put this here since we get the hooking-on-attribute-updating and update-all-subclasses-as-well automatically.
-
Kevin Modzelewski authored
-
Rudi Chen authored
-
Marius Wachtler authored
This reduces the number of stack access, because previously when we accessed a field of the interpreter we always had to load it first from stack into a reg - and now we have a dedicated reg. This is currently only a very small perf change but when #736 lands this becomes more important.
-
Kevin Modzelewski authored
My theory is that specifying the separate cache directories interacts badly with travis-ci. I think it will either delete any cache directories that look like they are no longer cached (ie when it finishes the debug build it will delete the release ccache dir since it looks unused), or maybe it keeps them around but only checks the most recent build for a cache hit (ie the debug build might check and only find ccache_release). So anyway, try always specifying both directories. Another option is to do the simpler thing and use a single directory for both caches, but I want to only change one thing at a time.
-
Kevin Modzelewski authored
Slightly speedup ASTInterpreter::initArguments
-
Chris Toshok authored
Call finalizers during garbage collection with ordering
-
Rudi Chen authored
-
Rudi Chen authored
- Non-integer and non-None object passed into slices can fall back to item operator. - Support indexeable items for slices when appropriate. - Increase setitem and delitem ic slot sizes so that the rewriter can succeed. - Increase the performance of using slice operators on built-in types avoiding a lot of the guards and slowpath.
-
Rudi Chen authored
- Call either the item functions (e.g. __getitem__) or slicing function (e.g. __getslice__) to match the CPython behavior. - Implement __getslice, __setslice__, __delslice__, for lists. - Implement __setslice__ for strings. - Some refactoring of common functionality for indexing and slicing. - A lot of tests.
-
Rudi Chen authored
Make sure CPython functions like PyObject_Del do not free any objects. It's better to let the GC free all objects because only the GC can guarantee that there are no more references to an object.
-
Rudi Chen authored
New testing helper function ensures that objects are garbage collected and their finalizers tested in a more strict order. This reduces the chances that an object isn't collected because a reference remains in the stack, but it's hard to fully solve this problem as long as we have conservative stack scanning.
-
Rudi Chen authored
- Call all finalizers properly, in a safe-to-do-so order. - Make finalizers work together with weak reference callbacks - namely, both should be able to get called, and weakref callbacks should be called before finalizers. - Old style classes are also supported, but we always do an attribute lookup for tp_del because there's no tp_del slot. Since it would be too slow to do an attribute lookup all the time in GC, we just assume all old-style classes have an ordered finalizer.
-
Rudi Chen authored
Make sure __del__ methods get assigned to tp_del in new style classes. Go through an attribute lookup in old style classes. Also, change the function calling structure to match CPython's a bit better. For exceptions thrown in tp_del methods, print a warning and ignore them, like CPython does.
-
Rudi Chen authored
-
Kevin Modzelewski authored
Fix parsing caching
-
Kevin Modzelewski authored
Reenable attr interning
-
Kevin Modzelewski authored
Flipped conditional meant that we were never caching the parse results :(
-
Kevin Modzelewski authored
If we ask for a string as non-interned, and then ask for an interned version of the string, we will discard the non-interned version and generated a new interned version. Now, keep the old version alive as well.
-
Kevin Modzelewski authored
From the course of debugging this gc issue. this commit shouldn't have much effect normally.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
update libpypa
-
Kevin Modzelewski authored
Add integration test for installing NumPy
-
Kevin Modzelewski authored
travis-ci fixes
-
- 21 Jul, 2015 9 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Kevin Modzelewski authored
You can't use exit() to exit in the same way as if you had died with a signal; we tried to do some exit-code munging but we did it one way and our tester script expected another way. we could resolve that, or use the approach here: try to die with the same signal by sending it to ourselves.
-
Rudi Chen authored
Doesn't work right now, but we'll want to support NumPy at some point.
-
Kevin Modzelewski authored
The debug builds are taking a very long time to compile, but when I reran one it completed very quickly. Let's see if this works+helps.
-
Chris Toshok authored
Add docs and tips for new contributors
-