- 28 Jul, 2015 3 commits
-
-
Kevin Modzelewski authored
For use of PyObject_GetItem django_template3 ends up calling this a fair amount via unicode_translate (ie it checks to see if certain entries are in the translation table).
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
The exceptions thrown by len itself can now be either style, though any exceptions thrown by any called functions (ex __len__) will still get thrown as C++ exceptions and converted if needed. Helps in a common case of "try calling len but don't worry if no len was defined".
-
- 27 Jul, 2015 11 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
list recursive printing
-
Kevin Modzelewski authored
optimize some misc runtime functions
-
Dong-hee,Na authored
-
Dong-hee,Na authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
callable(), str(), repr(), PySequence_GetItem(), and PyObject_HasAttrString() Mostly by bringing in the CPython versions.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
They are tricky since these are types, which means they invoke the relatively-complicated constructor logic. ie str() doesn't just call __str__ on the argument: if the result is a subclass of str, it calls result.__init__(). Similarly for unicode, except unicode is even trickier since it takes some more arguments, one of which is "encoding" which will have non-type-based dynamic behavior. I didn't realize that at first and optimized unicode() by exposing an inner version of it that takes its arguments in registers, which we can take advantage of using our jit-arg-rearrangement capability. This means we have to do parts of PyArg_ParseTuple ourselves, so I added a PyArg_ParseSingle that runs a single object through the arg-conversion code. PyArg_ParseSingle could be further optimized if we want to. Or rather, if we have functions of the form PyArg_ParseSingle_s (which corresponds to the "s" format code) we could skip some more of the overhead. I had to disable most of that once I realized the encoding issue, but I left it in since hopefully we will be able to use it again once we have some "do some guards after mutations if we know how to resume after a failed guard" rewriter support.
-
Kevin Modzelewski authored
get cpython/test_tuple.py to pass
-
Kevin Modzelewski authored
Get test_iter.py to work
-
- 24 Jul, 2015 12 commits
-
-
Kevin Modzelewski authored
Min max
-
Kevin Modzelewski authored
assign fixed slots (vregs) to the symbols.
-
Kevin Modzelewski authored
Use cpythons lock implementation
-
Marius Wachtler authored
This switches the thread lock implementation to use a semaphore instead of a mutex. I hope this gets rid of the threading_local.py error on travis-ci.
-
Marius Wachtler authored
This removes a bottleneck of the interpreter/bjit: most var accesses introduced a DenseMap lookup, with this change we use a fixed offset per var. The bjit stores the pointer to the vregs array inside r14 for fast accesses.
-
Marius Wachtler authored
Not having the ASTInterpreter GC allocated improves performance. I had to add a small asm function in order to produce a special stack frame where we can easily retrieve the ASTInterpreter*, to replace s_interpreterMaps job. This also make sure that this function really does not get inlined. The s_interpreterMap was hard to understand and produced several times problems (duplicate entries,...) This patch contains a hack which limits the number of variables inside a function to 512. Because we have to make sure the are all on the stack and can't dynamically add more space. An upcoming patch will remove this limitation and replace it with a stack alloca of the size of the actual number of variables the function uses.
-
Marius Wachtler authored
This switches the thread lock implementation to use a semaphore instead of a mutex. I hope this gets rid of the threading_local.py error on travis-ci.
-
Boxiang Sun authored
-
Boxiang Sun authored
-
Boxiang Sun authored
-
Kevin Modzelewski authored
Allow passing NULL for empty kwargs
-
Rudi Chen authored
-
- 23 Jul, 2015 14 commits
-
-
Kevin Modzelewski authored
This is a convention that cpython uses that is a good performance improvement -- unlike tuples, dicts are mutable, so we currently have to create a new dict for every call into a kwargs-taking function even if there are no keywords to pass. Have to modify the receiving ends to allow NULL kwargs. This includes the ast interpreter (which I think will automatically get the bjit), the llvm irgenerator, and as many runtime functions as I can find.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Pow
-
Kevin Modzelewski authored
Gcc 4.9 gmp fix
-
Kevin Modzelewski authored
Improve __getattr__ handling
-
Kevin Modzelewski authored
Reduce number of optimization passes we run
-
Kevin Modzelewski authored
bjit: inline trivial helper functions
-
Kevin Modzelewski authored
Release leftover chunk in the TraceStack.
-
Chris Toshok authored
-
Chris Toshok authored
-
Rudi Chen authored
-
Marius Wachtler authored
-
Kevin Modzelewski authored
The previous set was based on trying to get the absolute best results on microbenchmarks; go back to the small set.
-
Kevin Modzelewski authored
Fix gc visiting code for running generators
-