-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't generate guards when all arguments have fixed known types #981
base: master
Are you sure you want to change the base?
Conversation
9c8f88f
to
329d617
Compare
I fear that this commit is introducing random test failures :-( |
457f6ec
to
d88a295
Compare
2f274c0
to
c861dbf
Compare
c861dbf
to
7d2eb0c
Compare
7d2eb0c
to
95dd9b8
Compare
95dd9b8
to
e14338c
Compare
So I restarted the travis ci several and could not see a problem with this patch but the perf improvement is now much smaller:
|
e14338c
to
d8e5265
Compare
d8e5265
to
2b40b60
Compare
I think this adds some pretty heavy debugging that we might not always want, but turning this on is always my first debugging step.
I don't quite remember this but I think the goal was to ignore core/from_llvm, not all of core/
Ref nexedi fixing
Or rather, add some more refcount-related calls to it to help it get down to zero refs at the end.
Our underlying implementation still looks pretty different, but rather than implement some newly-needed APIs completely from scratch, I copied in some of CPython's implementation. The result is a bit messy (multiple ways of doing similar things), but I think it's a step in the right direction. Regardless, this commit adds "clean up thread-local storage when the local object dies" functionality, as well as better cleanup when there are multiple threads. I think this should help with the fork issues as well.
I wasn't sure what we would have to do in this case -- we don't really have any way of cleaning up the data referenced by those other threads. Fortunately(?), CPython doesn't do much cleanup of those threads (cleans up their metadata but doesn't try to clean up any references held by the thread), so we don't have to do much either. Just set a flag saying that this happened and that we should skip asserting that we got down to 0 refs.
that is just based off of pulling our latest release
PyObject_New: register the type if the type is not yet registered
The problem is that we emit an llvm "unreachable" instruction, and then continue to emit other code, which fails the verifier. endBlock(DEAD) is supposed to be the right way to handle that, but there is some more work that would need to be done there to get that working properly. So just do the easy thing for now -- create a new BB so that it's ok to emit more code.
We were doing a "call bumpUse() early" optimization to free up registers when we can, but as a side-effect it looked to the refcounter like the reference was done being used.
Not using it in this commit, just wanted to get the unmodified version in so it's easier to see the changes.
…ypes via their descrobject.c
This is for adding a guard on a non-immortal object, since we need to be safe against that object getting deallocated and a different object is allocated in its spot. We had support for this already, but it leaked memory. The biggest was that we never freed our runtimeICs, so if those ended up getting any GC references in them, then we would leak memory. So I started freeing those, but then that exposed the issue that the ICInvalidators expect that their dependent ICs never get freed. So I added back a mapping from ICSlotInfo-> ICInvalidators that reference them.
Create a simple Dockerfile
until I realize that it's because we were passing more tests than we expected.
The behavior changed in CPython 2.7.4, and Travis-CI runs 2.7.3.
Switch to CPython's descrobject.c
before we added a it as a module which made code fail which does something like __builtins__["unicode"]
Some packaging / distributing updates
Bump version numbers
update list of failing cpython tests
exec, input: if globals has no __builtins__ add it as a dictwrapper
…lasses can't change
2b40b60
to
93a65a7
Compare
352fd89
to
6488a3e
Compare
Don't generate argument guards for callattr & runtimeCalls if we know that the classes can't change.
My first approach kept track of every individual arg and tracked if it needed a guard but this had a too large overhead - I could not archive a speedup. This approach now only supports the case where all args have fixed classes.