[pypy-dev] Yet another trace tool!

Armin Rigo arigo at tunes.org
Mon Aug 30 12:58:00 CEST 2004

Hi Richard,

On Sat, Aug 28, 2004 at 10:22:31PM +0100, Richard Emslie wrote:
> Also BTW you can't overload c++ return types - unless you know something I 
> don't.

That's right, but it's not necessary.  The C version (genc.h) has a type code
for return type too (e.g. OP_ADD_iii) but that's only so that typer.py can
know what the return type will be, and convert it if needed.  In general I
don't think we need to overload on the return type.  If we define only:

  Int op_add(const Int&, const Int&)
  Ref op_add(const Ref&, const Ref&)

and then do:

  someref = op_add(someint, someint)

then the first signature will be choosen and the return type will be
automatically converted from Int to Ref, which is fine.


More information about the Pypy-dev mailing list