<mjacob>
sorry for the off-topic question, but there is a good chance that someone can help me:
<mjacob>
generating stack-machine code is "easy" for an expression AST, because the generated bytecode can evaluate sub-expressions in depth-first order of the tree. sub-expression sharing is possible only with a mechanism external to the AST, such as variables.
<mjacob>
imagine a DAG as the expression graph. sharing sub-expressions is possible by multiple nodes pointing to the same node.
<mjacob>
but how to generate stack machine code for an expression graph? is there maybe a more suitable machine?
adamholmberg has joined #pypy
forgottenone has joined #pypy
marky1991 has quit [Remote host closed the connection]
realitix has quit [Quit: realitix]
realitix has joined #pypy
xcm is now known as Guest27040
Guest27040 has quit [Killed (tepper.freenode.net (Nickname regained by services))]
Guest96610 has quit [Killed (cherryh.freenode.net (Nickname regained by services))]
xcm has joined #pypy
yaewa has quit [Quit: Leaving...]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #pypy
realitix has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix has quit [Quit: realitix]
worvast has quit [Ping timeout: 240 seconds]
marky1991 has joined #pypy
kipras has joined #pypy
marky1991 has quit [Ping timeout: 246 seconds]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #pypy
themsay has quit [Ping timeout: 244 seconds]
themsay has joined #pypy
agronholm has quit [Ping timeout: 250 seconds]
marky1991 has joined #pypy
themsay has quit [Read error: Connection reset by peer]
themsay has joined #pypy
marky1991 has quit [Ping timeout: 244 seconds]
marky1991 has joined #pypy
moei has joined #pypy
<kenaan>
rlamy default 0873ec79aa36 /rpython/rtyper/test/: Use OrderedDict as the reference to make hypothesis happy
marky1991 has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #pypy
worvast has joined #pypy
worvast has quit [Ping timeout: 250 seconds]
worvast has joined #pypy
Arfrever has joined #pypy
worvast has quit [Ping timeout: 268 seconds]
worvast has joined #pypy
<kenaan>
stevie_92 cpyext-gc-cycle faf091537a23 /rpython/memory/gc/: Fixed some minor issues and added TODOs for CPython style cycle detection
<kenaan>
stevie_92 cpyext-gc-cycle 6e15b053de37 /: Adapted tests in gc/rawrefcount to new cycle deletion
themsay has quit [Ping timeout: 268 seconds]
themsay has joined #pypy
<arigato>
there's a leak in cffi, if you create many threads from C and call Python functions from them
<arigato>
mjacob: note that even if the AST is a DAG, if you naively evaluate expressions by recursive calls then you win nothing by sharing nodes (just a tiny bit of memory for the AST itself)
<arigato>
I guess you could use an infinite-register bytecode instead, compiling every node (once) to an expression that reads the operand registers and writes into a new register
<arigato>
...re leak: it's just that in order to leak you need to store a Python object in the PyThreadState structure; by default there is none, by chance, but you can make one if you use a thread._local() variable for example
kanaka has joined #pypy
kanaka has quit [Changing host]
kanaka has joined #pypy
k1nd0f_ has joined #pypy
k1nd0f_ has quit [Remote host closed the connection]
k1nd0f_ has joined #pypy
worvast has quit [Quit: Leaving]
k1nd0f_ has quit [Ping timeout: 250 seconds]
jacob22__ has quit [Read error: Connection reset by peer]
PileOfDirt has joined #pypy
k1nd0f_ has joined #pypy
adamholmberg has quit [Remote host closed the connection]