[pypy-dev] Yet another trace tool!
arigo at tunes.org
Fri Aug 27 14:54:03 CEST 2004
On Fri, Aug 27, 2004 at 12:27:34PM +0100, Richard Emslie wrote:
> directory called pygame.
Argh. Renaming time...
> flow/annotation code. I was hoping to get it to a stage where I could
> point it to an imported module and it could convert it (and then maybe try
> intergrate with traceinteractive - although I've no idea how to convert
> app_xxx() space functions - I started hacking the FlowObjSpace <bad idea>,
> but I hoping you'd share you thoughts on that one???? :-))
Er, I think something had been done about these app-level helpers in
FlowObjSpace -- or was it just a plan never implemented?
> >typed C code. I was wondering about using C++'s overloaded functions:
> Yes - that was the plan - although I wasn't too sure how it would pan out
> (and I was going to mention it when I wrote to your last mail - but I
> assumed you'd already thought of it :-)).
Actually not :-)
> Previous experience has shown that if the types are c++ classes/structs
> then it does the job. But I do agree with your point.
I see. If the things include primitive types then it gets more messy.
Attached is an example where the call to op_add() is deemed ambiguous by the
compiler, and I don't see how to solve that problem -- unless we don't use
ints at all as the type of the variables, but only a custom class Integer
containing an int field, as shown in the 2nd attachement. Sadly, this is
elegant and fine with good C++ optimizers (e.g. Microsoft's) but g++ really
produces bad code in this kind of situation.
As you said, we should still try to do it this way, because it's not so
involved and quite independent from other efforts like generating C code with
conversions in the source.
In your gencpp.h, what is the purpose of CPythonProxyObject and its own
reference counter? It seems that class Handle could just use a PyObject*
directly and the Py_INCREF/DECREF() macros to manipulate its refcount.
I'll not be too much on IRC for the next 10 days or so, but I'll try to show
up on Sunday.
More information about the Pypy-dev