Hi Samuele,

Samuele Pedroni wrote:
you should not trust or use graph names in the backend, apart
for givin names to things. If a function is reused in more
than one class the information would not be useful (this can
happen in Python/RPython).
The graph would get the name based on the first class
under which it was found, this may be unrelated for example
for the class for self to the method name under which the graph
is attached.

nice to know this, I didn't know. I think I have to rethink to my approach for code generation...

Because there are too many variations about what is allowed in terms
of supporting functions vs. just methods, calling superclass
implementations of methods even when the method is overriden
in a subclass etc in the targets, right now it is up to the backend
to traverse and consider all classes and direct_calls and if the same
graph appears both attached to a method (or methods) in a class (or
classes) and in static method(s) in a direct call(s) decide what to do.
This is also true in general for graphs that appear as more than on
method in one place.

Ok, now it's clearer, thanks. So, to respond to my original question, I should create a sort of "graph database" to lookup when I need to know where have I put the code for that graph, right?

Well, let's begin refactoring! :-)

ciao Anto
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to