This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_cmp_outside_range(self): | |
ops = """ | |
[p0] | |
i0 = getfield_gc(p0, descr=chardescr) | |
i1 = int_lt(i0, 256) | |
guard_true(i1) [] | |
""" | |
expected = """ | |
[p0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r e5565168e86f rpython/jit/backend/llsupport/descr.py | |
--- a/rpython/jit/backend/llsupport/descr.py Fri Feb 14 14:34:24 2014 +0100 | |
+++ b/rpython/jit/backend/llsupport/descr.py Fri Feb 14 15:44:56 2014 +0100 | |
@@ -103,6 +103,26 @@ | |
def is_field_signed(self): | |
return self.flag == FLAG_SIGNED | |
+ def is_integer_bounded(self): | |
+ return self.flag in (FLAG_SIGNED, FLAG_UNSIGNED) \ | |
+ and self.field_size < symbolic.WORD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+476: i58 = getarrayitem_raw(i57, i42, descr=<ArrayU 1>) | |
debug_merge_point(0, 0, '<code object add. file 'test.py'. line 18> #33 BINARY_ADD') | |
+488: i59 = int_add_ovf(i53, i58) | |
guard_no_overflow(descr=<Guard0x7f9d69aaaf70>) [p1, p0, i59, p2, p3, p6, p7, p12, p14, p16, p20, i58, i53, i42] | |
rawarraydescr_char = cpu.arraydescrof(lltype.Array(lltype.Char, | |
hints={'nolength': True})) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Got: | |
i82 = int_lt(i77, 307200) | |
guard_true(i82, descr=<Guard0x7f0934de10c0>) | |
guard_not_invalidated(descr=<Guard0x7f0934de1050>) | |
i83 = getarrayitem_raw(i59, i77, descr=<ArrayS 4>) | |
===== HERE ===== | |
i84 = int_add(i62, i83) | |
i85 = int_sub(i77, 640) | |
i86 = getarrayitem_raw(i67, i85, descr=<ArrayS 4>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 625f047a5759 pypy/module/pypyjit/test_pypy_c/test_array.py | |
--- a/pypy/module/pypyjit/test_pypy_c/test_array.py Sat Feb 15 18:34:09 2014 +0100 | |
+++ b/pypy/module/pypyjit/test_pypy_c/test_array.py Sun Feb 16 21:05:38 2014 +0100 | |
@@ -67,26 +67,46 @@ | |
log = self.run(main, []) | |
assert log.result == 73574560 | |
loop, = log.loops_by_filename(self.filepath) | |
- assert loop.match(""" | |
- i13 = int_lt(i8, 307200) | |
- guard_true(i13, descr=...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✘ squeaky@squeaky-mbp ~/workspace/pypy ☿ 69181@default ± hg pull | |
pulling from ssh://[email protected]/pypy/pypy | |
searching for changes | |
no changes found | |
squeaky@squeaky-mbp ~/workspace/pypy ☿ 69181@default ± hg out | |
comparing with ssh://[email protected]/pypy/pypy | |
searching for changes | |
no changes found | |
✘ squeaky@squeaky-mbp ~/workspace/pypy ☿ 69181@default ± |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
operation(x, y) | |
a <= x <= b; c <= y <= d | |
// 32 bit machine | |
unsigned maxOR(unsigned a, unsigned b, | |
unsigned c, unsigned d) { | |
unsigned m, temp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add(a, b, c): | |
for i in range(LOOP): | |
c[i] = a[i] + b[i] + 1 | |
# Loop 4 (<code object add, file 'test.py', line 18> #13 FOR_ITER) : loop with 124 ops | |
[p0, p1] | |
+80: p2 = getfield_gc(p0, descr=<FieldP pypy.interpreter.pyframe.PyFrame.inst_pycode 96>) | |
+91: p3 = getfield_gc(p0, descr=<FieldP pypy.interpreter.pyframe.PyFrame.inst_lastblock 80>) | |
+95: i4 = getfield_gc(p0, descr=<FieldS pypy.interpreter.pyframe.PyFrame.inst_valuestackdepth 104>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./pytest.py -x ./pypy/objspace/std/test/test_celldict.py | |
============================================================================================================= test session starts ============================================================================================================= | |
platform linux2 -- Python 2.7.3[pypy-2.2.1-final] -- pytest-2.2.4.dev2 | |
pytest-2.2.4.dev2 from /home/squeaky/workspace/pypy/pytest.pyc | |
collected 55 items | |
pypy/objspace/std/test/test_celldict.py ...............F | |
================================================================================================================== FAILURES =================================================================================================================== | |
______________________________________________________________________________________________ TestModuleDictImplementation.test_setdefault_fast ______________________________________________________________________________________________ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from threading import Thread | |
from array import array | |
from sys import argv | |
data = array('B') | |
with open('/dev/urandom') as f: |