cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "the modern world where network packets and compiler optimizations are effectively hostile"
<simpson>
blachance: Then I'm not sure offhand what that abort could mean. Do you have a link to your repo? What's your basic evaluation strategy and how is your JIT hooked in?
<blachance>
by evaluation strategy do you mean e.g. bytecode vs AST?
<simpson>
Yeah. Like, do you have frames, continuations, etc.? "virtual" means a value that the JIT has determined doesn't exist outside of the current trace. The JIT tries to remove these when it can. I'm not sure how promotion interferes with this. I'm also still not sure that this is "virtuals" and not "virtualizables".
jamescampbell has quit [Remote host closed the connection]
jamescampbell has joined #pypy
jamescampbell has quit [Ping timeout: 260 seconds]
rokujyouhitoma has joined #pypy
pilne has joined #pypy
rokujyouhitoma has quit [Ping timeout: 258 seconds]
jamescampbell has joined #pypy
yuyichao_ has joined #pypy
yuyichao has quit [Read error: Connection reset by peer]
antocuni has joined #pypy
arigato has joined #pypy
<LarstiQ>
marky1991: might _r denote raw?
jamescampbell has quit [Remote host closed the connection]
<arigato>
marky1991: no, getfield_gc_r means ``get a field inside a gc object, and the field type is a "r"eference``
<arigato>
i.e. a pointer to another gc object
<arigato>
in a trace, operations often end with "_r", "_i" or "_f" depending on the type of the value they return. "_i" is for any integer including a raw (non-gc) pointer, "_f" is for floats
<marky1991>
that's kind of what i was thinking
<marky1991>
thanks for confirming
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 268 seconds]
<kenaan>
arigo py3.5 93580eb8c58e /pypy/module/thread/test/test_local.py: Fix test
oberstet has quit [Ping timeout: 268 seconds]
<blachance>
cfbolz: hmm, that sounds like something I am doing? I'm initializing my only one line above the dispatch loop/first call to jit_merge_point
<blachance>
* initializing my only green one line above
<blachance>
cl_var is probably the smallest class that does something interesting
<arigato>
blachance: I see that interpret() sometimes returns a fresh instance for 'c'
<arigato>
(depending on what exactly self.op is)
<arigato>
that would be what the JIT complains about
tbodt has joined #pypy
<blachance>
agh, I see... (and I guess those Prim classes are actually the smallest ones that do something interesting!)
<arigato>
the JIT works by assuming that what is sent to the 'green' variables are constants, representing the program to interpret
<blachance>
hm.. I think I'm having trouble understanding what things are and aren't constant---I've seen interpreters where e.g. a pc register is assigned to, yet pc is a green
<arigato>
in a translated program, integers are not "objects"
<arigato>
here the problem looks to be that 'c' is assigned a fresh object
<arigato>
so, really, "constant" here means "the same value in the C-translated program": if it is an object reference, then it must be a reference to the exact same object
<arigato>
this part of the JIT is a bit of an abstraction leak, because usually you don't have to worry about such low-level details
<arigato>
but here, e.g. a tuple would be represented as a pointer, so even using a new tuple is not allowed (even if it's just a tuple of the same two integers)
jamescampbell has joined #pypy
<blachance>
thanks for explaining that, I think that helps me see the issue I'm having
<blachance>
the self.op calls are indeed producing new instances, which it looks like I need to avoid
<arigato>
yes, you probably need to pre-build the complete tree of objects that represent everything that goes into the green variable
<arigato>
it's easier to do that with an interpreter like PyPy, because there is a clear distinction between the immutable 'code' objects and the rest
<arigato>
...ok, seems that by hacking for one hour again on py3.5, I found the next CPython bug
<blachance>
thanks all for the help, I'm starting to understand the translation process a little better now
<kenaan>
arigo py3.5 4d0f184d43a2 /pypy/: Accept buffer objects as filenames. It often works like the corresponding bytes object. Of course, os.listdir() is ...
Tiberium has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 246 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]