- 27 Mar, 2015 2 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Conflicts: src/codegen/ast_interpreter.cpp src/codegen/irgen/irgenerator.cpp src/codegen/pypa-parser.cpp
-
- 26 Mar, 2015 15 commits
-
-
Kevin Modzelewski authored
in merge: - with_ctxclass_instance_attrs now succeeds due to d1387d74 - merge ~conflict in LangPrimitive opcodes
-
Kevin Modzelewski authored
Remove dbg -O and release -n configurations. Just for dev; leave Travis-CI the way it is for now.
-
Kevin Modzelewski authored
They test what happens when a weakref's referent gets collected, but I guess in certain build configurations we would keep the object alive due to some sort of different memory layout (got saved in a CSR or a stack slot that didn't get rewritten, etc). Adding some extra function calls seems to help, though it's hard to tell how reliable it is.
-
Kevin Modzelewski authored
Misc fixes for pip part 3
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Use cpythons isinstance and issubclass implementation
-
Kevin Modzelewski authored
Use the pypa parser as the default parser.
-
Marius Wachtler authored
and let the interpreter actually do a cls lookup when encountering a ClsAttribute node...
-
Marius Wachtler authored
but both args have to fit into an int...
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Marius Wachtler authored
This commit removes our implementation of this functions, because they could not handle mixing of old and new style classes. And having two implementations with very similar name but different results is very confusing. Also adds __subclasscheck__ and __instancecheck__ support
-
Marius Wachtler authored
Switches the meaning of -x. In addition update to latest pypa version
-
Kevin Modzelewski authored
Previously it was UNTRACKED and the object's gcHandler would scan it if necessary. This worked ok most of the time but caused issues when we subclass from an extension class: the memory for those classes are allocated conservatively, which meant that a gc handler wasn't called. One potential approach would be to allocate extension objects as PYTHON allocations but with a gcHandler that both scans conservatively and also knows about the attrs array. But for now it seems easier to allocate the attrs array as a PRECISE array (which means it gets scanned) rather than UNTRACKED, since it will automatically get picked up (and provide better gc safety in general and remove one of the odd gc cases). I didn't realize that we weren't using PRECISE at all and that it wasn't completely working, so this change also required setting kind_data for PRECISE allocations, and fixing the way we keep this updated during gc_realloc.
-
Kevin Modzelewski authored
- Add some more time functions - Workaround for logging for now, to not try to show the caller frame - Copy over everything in LIBPYSTON in the cmake build (useful for django to copy over things like templates) - Allow str/unicode subclasses in more places - Add a BoxedFile gc handler - PyLong_FromString - set.difference - iter(iter(""))
-
- 25 Mar, 2015 9 commits
-
-
Chris Toshok authored
Cache pypa parsed AST to disk
-
Michael Arntzenius authored
Conflicts: src/core/ast.h src/core/cfg.cpp test/tests/sys_test.py
-
Michael Arntzenius authored
This lets class & function definitions become ordinary assignments in the CFG, which simplifies our invariants and fixes problems with the interaction between definedness analysis and block-terminating "invoke"s.
-
Kevin Modzelewski authored
Add a simple 'code' type (ex f.func_code), and some related things like f.func_defaults. This implementation isn't super performant or consistent, but I think these particular features are relatively rarely used?
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Misc fixes for pip search part 2
-
Kevin Modzelewski authored
print HASNEXT primitive properly
-
Michael Arntzenius authored
-
- 24 Mar, 2015 11 commits
-
-
Kevin Modzelewski authored
We were getting some gc issues with these, I think because there could be GC pointers behind the GC-opaque shared_ptr pointers. Just make impl be a conservatively-allocated object so that the collector will find it while scanning. We still need to explicitly call BoxIterator::gcAlloc if we store a reference (ex for BoxedEnumerate), but this should mean that we keep these alive when they are just on the stack (ex when we do a for-each loop over pyElements). I don't really like how this turned out, but I think the better option is to get rid of the indirection.
-
Kevin Modzelewski authored
Also fix str.rpartition, and add a signal handler for SIGUSR1 that prints out a stack trace. I wanted this because our stack unwinder doesn't work when called from a gdb print command, so it was hard to debug why we were in an infinite loop. Also, fix the '-i' argument so that we get back to the repl if the program throws an exception.
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
It's trickier than just setting all of the attributes, since any updates to either the original dict or to the object's attributes will get mirrored in the other object. I don't know if anyone uses this, but I don't think there's any good way for us to tell if this is going to happen so we just have to be conservative. So, add a new distinction between "types" of hidden classes, and add a new "dict backed" type. Instead of having an array of attributes, has a single attribute which is a dict. There are some pretty tricky corner cases that we don't support yet, such as if you access and save __dict__, then set __dict__, and then try to access the saved version. At least we can detect that and fail.
-
Kevin Modzelewski authored
cmake fix libunwind flags
-
Kevin Modzelewski authored
- Inherit simple_destructor from base classes - Handle unreachable code better - Call reprICAsString instead of reprIC - Fix self-assignment checking bug
-
Daniel Agar authored
-don't pass empty CFLAGS='' when buliding libunwind in release mode -revert libunwind to older version that has per thread caching enabled and match Makefile
-
Michael Arntzenius authored
-
- 23 Mar, 2015 3 commits
-
-
Michael Arntzenius authored
-
Michael Arntzenius authored
- exceptions_test: exceptions_test now succeeds, unless we're JITting. It fails due to a bug in llvm codegen having to do with definedness analysis; see comment in emitBBs in irgen.cpp. - with_{class,functiondef}, try_{class,def}: Expose the same JIT bug that occurs in exceptions_test. - try_return_finally: We used to flip an internal assert in compareKeyset when JITting this test, but it's fixed now. - file_closed: Files have a `closed' attribute in Python, but not yet in Pyston. - finally_except: Our CFG pass had some corner case bugs when nesting a try/finally inside a try/except. This checks they're fixed. - try_continue: The CFG pass has a bug in its syntax error reporting. - with_continue, try_continue: Checks that `with'/`try'/`finally' handle syntax errors properly. - with_ctxclass_instance_attrs: Checks that we're accessing context-manager attributes on the context-manager's class, not the instance, when we run a `with'. As it turns out, our AST interpreter has a bug in ClsAttribute (I think) which means that we don't. Our JIT works ok, though. - with_ctxclass_order_of_access: Checks that we're accessing context-manager attributes in the right order when we run a `with', which we are. - with_file: Our `file' object runtime previously didn't support `with' properly. This checks that files work with `with'.
-
Michael Arntzenius authored
-