- 27 Aug, 2015 1 commit
-
-
Marius Wachtler authored
If a jump offset is larger then 0x80 the instruction encoding requires 6bytes instead of 2bytes. This adds up quickly, thats why we will try to find another jump to the slowpath with the same condition with a smaller offset and jump to it / use it as a trampoline. The benchmark show that this increases the performance slightly even though it introduces additional jumps.
-
- 26 Aug, 2015 2 commits
-
-
Kevin Modzelewski authored
Some reorganization of CLFunction/BoxedCode code.
-
Rudi Chen authored
- The code_obj field of CLFunction should be private since we require the use of an accessor there. - Move some functions implementations out of headers. - Put static methods into class.
-
- 25 Aug, 2015 14 commits
-
-
Kevin Modzelewski authored
-
Marius Wachtler authored
This reduces the number of c++ exceptions we throw for iterators writen in python
-
Marius Wachtler authored
-
Kevin Modzelewski authored
Fix "error return without exception set"
-
Kevin Modzelewski authored
Based on Marius's #865, with some extra checking and a test.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
more getattr rewriting
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Class gc fix: integrate with the finalization logic
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
I was noticing that classes were getting freed a few collections after they were seen to be not-marked; the issue with the old keep-classes-alive implementation is that it assumed that !isMarked() implies that the object will be freed in the sweep phase. With the finalization ordering, this isn't true. We could move the ordering before the keep-classes-alive behavior, but then the finalization ordering might get things wrong since it wouldn't see the final set of mark bits. So I think we need to integrate the two phases. I think it ends up working to just say that type objects have ordered finalizers, even though they typically don't; I think this gets us the guarantees we need.
-
- 24 Aug, 2015 6 commits
-
-
Kevin Modzelewski authored
Fix and reenable type speculations
-
Marius Wachtler authored
we were checking if the functions retrieves the exact same number of args as our calling convention requested this failed for varargs. I encountered this while running test/cpython/test_math.py
-
Marius Wachtler authored
-
Marius Wachtler authored
travis-ci encountered sometimes a crash while running test_math.py. This should fix the issue (the routines are used when creating a float from a string constant)
-
Kevin Modzelewski authored
By moving the deopt logic into an inner frame. I think we trigger the isDeopt() block twice since there's a destructor that has to get run.
-
Marius Wachtler authored
-
- 22 Aug, 2015 10 commits
-
-
Kevin Modzelewski authored
Reduce some codegen allocations
-
Kevin Modzelewski authored
Don't malloc-allocate rewriter lambdas
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
This commit works by adding a SmallFunction class that behaves like std::function, but allocates its data inline rather than through a separate allocation. It probably could have also worked by taking a custom allocator and using the new RegionAllocator. It adds a bit more restrictions than std::function does (the types caught by the closure have to be more "trivial" than std::function supports), so some of this change is marking some types as trivial, or copying data into a trivial format from things that aren't (ex SmallVector).
-
Kevin Modzelewski authored
We were storing and passing them as std::unordered_map (and sometimes switching to std::vector). But the set can only contain the integers 0 through 15, so just represent it as a bitset.
-
Kevin Modzelewski authored
Maybe a better overall approach is to not convert it out of its original flat format; we keep that original memory around anyway and I don't think it's that much faster to scan than our parsed version. But for now, optimize the current approach: - convert vector->SmallVector - call ensure since we usually know how many elements the vectors will have - use a StringMap instead of an unordered_map<std::string>
-
Kevin Modzelewski authored
ie a simple bump-pointer allocator that will release all of its memory when the rewrite itself gets deallocated. Not a huge help itself, since most of the mallocs have been removed from the rewriter, except for the std::functions which don't take a custom allocator (at least not in libstdc++ 4.8 [and 4.9 I think]).
-
Kevin Modzelewski authored
Fix submodules
-
Kevin Modzelewski authored
Somehow most of them did not make it in the second merge.
-
Kevin Modzelewski authored
Undo testsuite split
-
- 21 Aug, 2015 7 commits
-
-
Kevin Modzelewski authored
Reduce allocations
-
Kevin Modzelewski authored
Use adjustment-post division to avoid int division overflow
-
Kevin Modzelewski authored
For some reason CPython allocates an extra "item" for generic variable-sized objects, but it looks like it doesn't do that for tuples. We had been doing that, so let's try not doing that and saving 8 bytes per tuple.
-
Kevin Modzelewski authored
Reduces boxing during the import process
-
Kevin Modzelewski authored
This is a temporary fix for the fact that "-1" is currently getting parsed as "-(1)", which will cause us to call '(1).__neg__()' with the associated overhead and allocation. It should be useful even after that gets fixed though.
-
Kevin Modzelewski authored
- Check for the allocation of empty tuples and just return the singleton - Try to avoid creating the kwargs dict since it might end up being empty - Let unicode-creation special case apply to all argument types - Fix type(obj) to be fast again (got superceded by a different special case) - Do fewer allocations in int()
-
Kevin Modzelewski authored
-