greedom has quit [Remote host closed the connection]
greedom has joined #pypy
greedom has quit [Remote host closed the connection]
greedom has joined #pypy
greedom has quit [Remote host closed the connection]
greedom has joined #pypy
fotis has quit [Ping timeout: 258 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 265 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 255 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 240 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 252 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 268 seconds]
greedom has quit [Remote host closed the connection]
greedom has joined #pypy
fotis has joined #pypy
<arigato>
smarr: you should really look at the assembler produced by gcc to be sure
<arigato>
RPyAssert line 29 is a macro removed
<arigato>
so lines 26-28 are dead code and are removed
<arigato>
then both branches of the "if" are identical, which I'm mostly sure gcc optimize too
<arigato>
ah no
<arigato>
the two branches are for the case where the indexing is done with a negative number
<arigato>
this check is not removed and cannot be, because RPython always supports "lst[index]" with a negative index
<arigato>
if you want to explicitly remove it, you need to say "assert index >= 0" before, where "index" is just a local variable, not an expression, which is also used in "lst[index]"
<arigato>
but lines 36-38 definitely compile to nothing
fotis has quit [Ping timeout: 258 seconds]
<arigato>
lines 39-44 are needed for the GC but compile to a single assembler instruction, "TEST" on x86