- 29 Aug, 2015 7 commits
-
-
Kevin Modzelewski authored
We often have cases where the "attr" part of a callattr can be rewritten but the "call" part cannot. This change lets us be able to rewrite the getattr and then write out the call as a call just to runtimeCallInternal.
-
Kevin Modzelewski authored
Add a concept of rewriter "aggressiveness" that decreases over time. It starts off high and we will try to rewrite everything fully, but as we succeed too often (megamorphic) or fail to rewrite, we will decrease the aggressiveness and produce more generic rewrites. This means they are more likely to succeed both at the rewriting stage and at the execution stage.
-
Kevin Modzelewski authored
Previously, we would inspect the combination of (return_value, exception_state) to try to determine what the behavior of future rewrites will be. For example, if no attribute was returned and no exception was thrown, then we would assume that all future times through the rewrite the behavior would be the same. This has caused a few bugs, and I'm about to add other cases where it won't be possible to examine the current function's return value to determine what the future rewrites will do. So instead, have getattr-like functions return a "rewriter return convention" flag that says how future rewrites will behave.
-
Kevin Modzelewski authored
3-arg execfile
-
Kevin Modzelewski authored
Rewrite some more typeCall cases
-
Kevin Modzelewski authored
Some random runtime function optimizations
-
Kevin Modzelewski authored
misc small perf improvments
-
- 28 Aug, 2015 5 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
I don't think it's that important overall but it seems to be a decent percentage of the time to enter the interpreter/bjit; this commit saves about 10% in a silly ubenchmark.
-
Kevin Modzelewski authored
When we call a __new__ we know nothing about, we have no idea what __init__ function we may or may not need to call. So emit a call to a helper function that will take care of that for us, which isn't itself any faster but lets the rewrite succeed.
-
Marius Wachtler authored
-
- 27 Aug, 2015 6 commits
-
-
Kevin Modzelewski authored
Small improvements to reduce the size of rewrites
-
Kevin Modzelewski authored
Mostly around trying to avoid calling callattr().
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Marius Wachtler authored
-
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
-