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
✘ 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
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
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
+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
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
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
from array import array | |
LOOP = 10000 | |
a = array('B') | |
b = array('B') | |
c = array('H') | |
with open('/dev/urandom') as f: |
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
# consumer | |
from __future__ import print_function | |
import gevent | |
from gevent.monkey import patch_all | |
import psycogreen.gevent | |
import psycopg2 |
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
# uwsgi --module uwsgiws --callable application --master --http :8080 --http-websockets --gevent 100 | |
# this works | |
import uwsgi | |
from gevent.monkey import patch_all | |
patch_all() |