Skip to content
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

Switch to CPython's descrobject.c #1209

Merged
merged 11 commits into from
May 25, 2016
Merged

Switch to CPython's descrobject.c #1209

merged 11 commits into from
May 25, 2016

Conversation

kmod
Copy link
Collaborator

@kmod kmod commented May 24, 2016

for a few types. But still keep our optimized rewriting for their call functions.

@kmod kmod force-pushed the cpython_descr2 branch 5 times, most recently from 7a4088c to 92eec30 Compare May 25, 2016 01:18
kmod added 8 commits May 25, 2016 01:26
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.
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.
@kmod kmod force-pushed the cpython_descr2 branch from 92eec30 to a11ffa7 Compare May 25, 2016 02:46
kmod added 3 commits May 25, 2016 02:54
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.
@kmod kmod merged commit 7974eb8 into pyston:master May 25, 2016
@kmod kmod deleted the cpython_descr2 branch June 28, 2016 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant