- 03 Mar, 2015 7 commits
-
-
Daniel Agar authored
-fixes #339
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
The core functionality is to calculate and store tp_mro and tp_bases instead of just tp_base. This gives the runtime a bit harder of a time to bootstrap itself since now a fully-built class depends on a few more classes, so the bootstrapping section got larger: - object_cls (base of the tp_base hierarchy) - type_cls (base of the metaclass hierarchy) - str_cls (for ht_name) - tuple_cls (for tp_mro) - list_cls (for calculating the mro) There were a few places that needed to be updated now that we have multiple inheritance: - typeLookup() - isSubclass() - typeNew() - super() This change doesn't even attempt to add multiple inheritance rules around old-style classes.
-
Kevin Modzelewski authored
While most of this code is unexercised with just this commit, I wanted to add it so that it's more clear what the multiple inheritance changes actually are.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Our class-creation code is getting pretty unruly, since there are four places we can create new classes: 1) extension classes 2) Python-defined classes 3) builtin-defined classes 4) classes created during bootstrapping Then, there are multiple different sets of initialization functions that can be called, each of which initializes different sets of the class attributes. It's not easy to tell what a given initialization function should actually initialize. This change just cleans this up slightly: it renames PystonType_Ready to commonClassSetup to hopefully be more clear about its goal, as well as adds a BoxedClass::finishInitialization() function. It also moves some work out of the BoxedClass() constructor, since this causes issues because it happens before the BoxedHeapClass() constructor runs, which sets certain class slots that affect other parts of class initialization. Things are still pretty complicated but this should help with the multiple inheritance changes that are coming.
-
Kevin Modzelewski authored
add tests for "[] = []", "2 = 2"; currently we core dump on these
-
- 02 Mar, 2015 14 commits
-
-
Kevin Modzelewski authored
Implement `pyston -c command`
-
Michael Arntzenius authored
-
Michael Arntzenius authored
-
Michael Arntzenius authored
-
Michael Arntzenius authored
-
Michael Arntzenius authored
-
Kevin Modzelewski authored
Smaller changes to get more of virtualenv running
-
Kevin Modzelewski authored
Add cStringIO module + basic support for setting member descriptors
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Marius Wachtler authored
In addition fixed a bug: The rewriter generated a 64bit mem comparison for the 32bit offset value, thus comparing partially undefined memory.
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Michael Arntzenius authored
-
- 01 Mar, 2015 1 commit
-
-
Kevin Modzelewski authored
Implement vararg map()
-
- 28 Feb, 2015 8 commits
-
-
Marius Wachtler authored
-
Chris Toshok authored
Weakrefs
-
Chris Toshok authored
-
Chris Toshok authored
-
Chris Toshok authored
-
Chris Toshok authored
bring in the cpython implementation of weakrefs, and post init_weakref() overwrite some fields in the BoxedClass's for weakref.ref/proxy/callableproxy so that they participate in our GC (we also make use of their tp_traverse functions for scanning and tp_clear functions as their simple_destructor.) as we sweep the heap: 1) any unreachable objects that have weakreferences are kept alive and placed in an std::list called weakly_referenced. 2) any unreachable weakref.ref objects are cleared and removed from their referent's list. After sweeping the entire heap, we then loop over the objects in weakly_referenced. If an object in the list still has weak references, we loop over them clearing their target (setting it to None), and calling their callback if they have one. test/tests/weakref1.py tests this.
-
Chris Toshok authored
-
Kevin Modzelewski authored
-
- 27 Feb, 2015 10 commits
-
-
Kevin Modzelewski authored
Fixes issue #294
-
Kevin Modzelewski authored
Add the unicodedata module
-
Kevin Modzelewski authored
use llvm::SmallVector to reduce allocations
-
Kevin Modzelewski authored
tester.py: canonicalize_stderr: add substitution for object.__new__() error
-
Kevin Modzelewski authored
Implement str.replace maxreplaces
-
Marius Wachtler authored
-
Chris Toshok authored
There were a lot of std::vectors in the rewriter and in the invoke machinery (callFunc and friends), and every std::vector usage involves a call to malloc (and free when is destroyed.) we should be using llvm::SmallVector wherever we can in performance sensitive code, since it allows a configurable stack allocated buffer. It reverts to malloc/free if you blow the buffer's capacity, but as long as things are tuned well, we can get a pretty significant speedup. There is more work to be done, but this change gets us ~3% on geomean.
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Kevin Modzelewski authored
I don't like making extension modules call a function (here called PyGC_AddRoot), but I think this is something that we can eventually automate (look for stores to static locations) so I don't mind going with a temporary solution.
-