- 05 Oct, 2016 1 commit
-
-
Marius Wachtler authored
**basic design:** This PR changes our BST nodes to directly operate on vregs instead of pointers to other nodes and names (except a few exceptions: `BST_Invoke`, `BST_MakeFunction` and `BST_MakeClass` which still needs to get converted). Most nodes got a destination vreg and one or more source vregs. Currently all of them are 32bit long but I plan to store them more compact very soon. Some nodes support a variable size of operands (e.g. the tuple node) but the size can't change after creating the node. I removed several unneeded opcodes and split a lot of nodes into separate opcodes (it may make sense to split them even further in the future). Generally all instructions except `CopyVReg` kill the source operand vregs except if the source is a ref to a constant. If one needs the preserve the source vreg on needs to create a new temporary using the `CopyVReg` opcode. There is a special vreg number: `VREG_UNDEFINED = std::numeric_limits<int>::min()`. - when it's set as an operand vreg: it means that this is a not-set optional argument. (e.g. for a slice which only has `lower` set, `upper` would be `VREG_UNDEFINED`) - if it's the destination it's means the result value should get immediately killed (e.g. `invoke 15 16: %undef = %11(%14)` this is a call whose result gets ignored) all other negative vreg numbers are indices into a constant table (after adding 1 and making them positive). (e.g. `(4, 2, 'lala')` generates: `%undef = (%-1|4|, %-2|2|, %-3|'lala'|)` this creates a tuple whose elements are the constant idx -1, -2 and -3. In order to make it easier for a human to understand we print the actual value of the constant between | characters) - constants can be all str and numeric types and 'None'. - every constant will only get stored once in the table this reduces the total memory usage by about 20% currently but I'm very sure with the future changes it will be significantly lower. **near future:** - change the jump and branch instruction to reference `CFGBlocks` by index. - store all `InternedString` inside a table and use indices into the the table to access them. - remove the 'BoxedCode*' member - devirtualize the classes = with this changes the bytecode can get freely copied around (only need to update the CFGBlock table) which allows us to attach the directly next to each other. - I plan to use one bit of the the opcode to mark the instruction as only requiring 8bit vreg operands (which should handle the majority of cases with 128 temps and 127 constants + 1undef vreg value) - another bit will get used to specify if this instruction is inside an `invoke`. if this bit is set there are 2 one 1 or 4 bytes long block indices directly behind the instruction. - serialize the bytecode to disk. (maybe serialize the constants using pickle) **thing which need to get improved** - currently the constant table get's attached to the `BoxedModule` maybe there is a better location, I also needed to pass the `BoxedModule` into some functions e.g. BST printing because otherwise we could not pretty-print the constants - `BST_Name` is not an opcode it's just used to initialize the arguments when a function get's called and stores where and how the arguments need to get stored. - more consistent opcode names and rename `TmpValue` to something better - we currently don't print the `InternedString` name - we only print the vreg number **additional changed made which are hidden in the large diff**
👎 - removed unused code initializing the items of `BST_Dict` (we use/used separate assignments to add the items) - lower `ExtSlice` inside the CFG phase to a tuple of slices - separated opcode for load subscript when it needs to be a slice and when it's only lower and upper (=`__getslice__`) before this got handled in the interpreter/jit - generate a constant `None` load inside the CFG when `None` gets loaded by name
-
- 29 Sep, 2016 1 commit
-
-
Kevin Modzelewski authored
Add test for typing.py and fix the issues it uncovers
-
- 28 Sep, 2016 2 commits
-
-
Kevin Modzelewski authored
Otherwise they would inherit object's __doc__
-
Kevin Modzelewski authored
-
- 27 Sep, 2016 2 commits
-
-
Kevin Modzelewski authored
Update lz4 to a version compatible with gcc 4.9+
-
Kevin Modzelewski authored
Not 100% sure of the reason but lz4 gets mis-optimized (or "has UB" depending on who you ask) in the version that we're using, so update to a version that has a fix.
-
- 26 Sep, 2016 1 commit
-
-
Kevin Modzelewski authored
Make these properly CAPI functions
-
- 21 Sep, 2016 4 commits
-
-
Kevin Modzelewski authored
Change section memory manager to fix performance problem in long-runn…
-
Kevin Modzelewski authored
-
Dong-hee Na authored
remove RODataMem.FreeMem.clear(); and replace return true to RELEASE_ASSERT(0, "finalizeMemory failed")
-
Kevin Modzelewski authored
Add type.__instancecheck__ and __subclasscheck__
-
- 20 Sep, 2016 1 commit
-
-
Kevin Modzelewski authored
We supported classes that overrode them, but didn't provide a default implementation in case people called it by hand. The tricky part is making sure that these new additions don't mess with our "does this class override __instancecheck__" optimizations.
-
- 19 Sep, 2016 2 commits
-
-
Marius Wachtler authored
Fix docs about stats option
-
sh92 authored
-
- 14 Sep, 2016 1 commit
-
-
Dong-hee Na authored
-
- 13 Sep, 2016 4 commits
-
-
Dong-hee Na authored
-
Kevin Modzelewski authored
Take a pass over the CPython tests
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
and only run the small variant in debug mode to avoid timeouts. Previously I had tried splitting it in half, but it looks like that's both not enough to avoid timeouts, and it also has a race condition when trying to run two copies of the test at the same time (one will read the not-fully-written pickled output of the other).
-
- 12 Sep, 2016 15 commits
-
-
Kevin Modzelewski authored
Two of these tests pass in release mode but not in debug (one is a timeout, the other is an assertion) Two of them are failing in both and I don't know why I marked them as succeeding.
-
Kevin Modzelewski authored
ie did some quick debugging and added test notes
-
Kevin Modzelewski authored
needed because of how we symlink things
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
test_itertools was failing because of a version mismatch between the test and the implementation we copied
-
Kevin Modzelewski authored
For some reason the max-RSS limit doesn't seem to be kicking in. Switch to putting a limit on the virtual size instead, and bump the limit from 500MB to 1.5GB.
-
Kevin Modzelewski authored
to not conflict with CPython's -O. They're quite similar (increase optimization level), but some tests ask for -O when they don't really want our version of it.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Main difference is lowering the recursion-depth on unoptimized builds, since we need more stack space per python frame.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
We symlink the CPython tests into our tests directory to control which ones we will attempt to run. A bunch of the tests though need other test files in order to run, and we hadn't symlinked those in. At some point we should switch to symlinking the Lib/test directory instead of individual files, but for now this helps.
-
Kevin Modzelewski authored
[WIP]Let GCC 5 happy and update the CPython test notes
-
- 11 Sep, 2016 2 commits
-
-
Boxiang Sun authored
-
Boxiang Sun authored
-
- 10 Sep, 2016 4 commits
-
-
Kevin Modzelewski authored
Be able to run an unmodified virtualenv
-
Kevin Modzelewski authored
These cpython tests are working now
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Which are quite hard to reproduce because they depend on the details of the C stack. Anyway, we should probably start using the recursion-depth-tracking functions in more place, rather than getting segfaults. There are a lot of CPython tests that test for recursion-depth-checking.
-