cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
<kenaan>
arigo int-test-is-zero 092643ba66ac /rpython/jit/: Generate more compact code for bit tests using the TEST instruction: i1 = int_and(i0, 7); i2 = int_i...
<kenaan>
arigo int-test-is-zero bbc157fc2398 /pypy/module/pypyjit/test_pypy_c/test_misc.py: skip this test on non-x86 platforms
<kenaan>
arigo int-test-is-zero d731a41aae59 /: Close branch int-test-is-zero
<kenaan>
arigo default 18443d3a74d5 /: Merged in int-test-is-zero (pull request #684) Use the TEST assembler instruction on x86
<kenaan>
rlamy hpy e2a687fd8ab3 /pypy/module/cpyext/: Fix cparser issue with struct types appearing in function arguments
CrazyPython has joined #pypy
<kenaan>
arigo default 8fc092d343a0 /pypy/module/pypyjit/test_pypy_c/test_micronumpy.py: Fix some failures of test_pypy_c on aarch64
<cfbolz>
arigato: cool,
<cfbolz>
Did you see a lot of int_and?
lritter has quit [Ping timeout: 265 seconds]
ronan has quit [Ping timeout: 276 seconds]
<arigato>
cfbolz: unclear, but over the years it's a pattern I saw from time to time
<arigato>
today I saw it in aarch64 to check if a pointer is correctly aligned, but of course I didn't implement that for aarch64 anyway, only for x86 (where it removes more instructions)
<arigato>
it shows up on app-level code like "if i % 4:"
<arigato>
...bah
<arigato>
in such app-level code, the value "i % 4" appears in failargs so it needs to be computed anyway
<arigato>
...and bah again, in "if (i % 4) == 0:" we get a "int_eq(.., 0)" instead of "int_is_true(..)"
ronan has joined #pypy
<arigato>
ok so it looks like a bit of a useless idea
inhahe_ has joined #pypy
CrazyPython has quit [Ping timeout: 245 seconds]
inhahe has quit [Ping timeout: 252 seconds]
CrazyPython has joined #pypy
ronan has quit [Ping timeout: 265 seconds]
ronan has joined #pypy
<cfbolz>
arigato: but "if a & 4: " works?
dddddd has joined #pypy
ronan has quit [Ping timeout: 240 seconds]
<arigato>
no
<arigato>
it does stupidly "i1 = int_and(a, 4); i2 = int_test_is_zero(a, 4); guard(i2)[i1]"
<arigato>
not really worse than before but not better either
CrazyPython has quit [Read error: Connection reset by peer]
<arigato>
maybe I should revert and try to do a different hack to detect that after computing "i1 = int_and(a, 4)" I can directly check the cpu flags---iow, the "int_is_true" is pointless
ronan has joined #pypy
rubdos has quit [Ping timeout: 250 seconds]
<cfbolz>
arigato: yes, sounds like a good idea
<cfbolz>
We need tree pattern matching in the x86 backend ;-)
<arigato>
:-)
rubdos has joined #pypy
ronan has quit [Ping timeout: 240 seconds]
jvesely has joined #pypy
ronan has joined #pypy
<kenaan>
rlamy hpy 01381639f0d0 /pypy/module/cpyext/test/test_cparser.py: Add a cparser test
<kenaan>
rlamy hpy 54d6b14f3362 /pypy/module/hpy_universal/: Begin implementing hpy_universal.load()
ronan has quit [Ping timeout: 265 seconds]
<kenaan>
arigo hpy 30944126f7e1 /pypy/module/cpyext/api.py: (ronan, arigo) Don't call PyErr_Occurred() when its result is not needed
<kenaan>
arigo hpy 5d81fcd424a5 /pypy/module/hpy_universal/: (ronan, arigo) in-progress: start to make C stuff and link it to RPython stuff (for now, that's mostly the HPyContext)
ronan has joined #pypy
ronan has quit [Ping timeout: 276 seconds]
CrazyPython has joined #pypy
ronan has joined #pypy
ronan has quit [Remote host closed the connection]
ronan has joined #pypy
<kenaan>
arigo hpy b3357dcf16a7 /pypy/module/hpy_universal/: (ronan, arigo, antocuni just arrived now) Yay, we can now import the empty module
<kenaan>
arigo hpy 72227d40aa42 /pypy/module/hpy_universal/test/test_basic.py: Put the next test to pass
ronan__ has joined #pypy
ronan__ has quit [Remote host closed the connection]
<kenaan>
antocuni hpy 949c501dadd7 /pypy/module/hpy_universal/: (antocuni, arigo, ronan): kill the usage of @slot_function from cpyext and use the much simpler @apifunc