[pypy-dev] Re: [pypy-svn] r15225 - in pypy/dist/pypy: module/math rpython rpython/module

holger krekel hpk at trillke.net
Thu Jul 28 14:03:22 CEST 2005


Hi Anders, 

On Thu, Jul 28, 2005 at 10:56 +0200, ale at codespeak.net wrote:
> Author: ale
> Date: Thu Jul 28 10:56:16 2005
> New Revision: 15225
> 
> Modified:
>    pypy/dist/pypy/module/math/__init__.py
>    pypy/dist/pypy/rpython/extfunctable.py
>    pypy/dist/pypy/rpython/llinterp.py
>    pypy/dist/pypy/rpython/module/ll_math.py

we should try to add tests when adding new external
function implementations. Otherwise we get frustrating
errors in translation after running for >10 minutes. 

> Modified: pypy/dist/pypy/rpython/module/ll_math.py
> ==============================================================================
> --- pypy/dist/pypy/rpython/module/ll_math.py	(original)
> +++ pypy/dist/pypy/rpython/module/ll_math.py	Thu Jul 28 10:56:16 2005
> @@ -2,6 +2,10 @@
>  
>  import math
>  
> +def ll_math_log(x):
> +    return math.log(x)
> +ll_math_log.suggested_primitive = True

'log' actually takes two arguments (see pypy/module/math/interp_math.py
or plain python's math.log).  On a related note, ll-external function 
implementations cannot have default arguments. 

cheers, 

    holger



More information about the Pypy-dev mailing list