[pypy-svn] pypy default: math.is{inf,nan} are purefunctions

alex_gaynor commits-noreply at bitbucket.org
Mon Mar 28 01:45:49 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r42991:498a6a982a94
Date: 2011-03-27 19:45 -0400
http://bitbucket.org/pypy/pypy/changeset/498a6a982a94/

Log:	math.is{inf,nan} are purefunctions

diff --git a/pypy/rpython/lltypesystem/module/ll_math.py b/pypy/rpython/lltypesystem/module/ll_math.py
--- a/pypy/rpython/lltypesystem/module/ll_math.py
+++ b/pypy/rpython/lltypesystem/module/ll_math.py
@@ -6,7 +6,7 @@
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.tool.sourcetools import func_with_new_name
 from pypy.tool.autopath import pypydir
-from pypy.rlib import rposix
+from pypy.rlib import jit, rposix
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 from pypy.rlib.rfloat import isinf, isnan, INFINITY, NAN
 
@@ -91,11 +91,11 @@
 #
 # Custom implementations
 
-
+ at jit.purefunction
 def ll_math_isnan(y):
     return bool(math_isnan(y))
 
-
+ at jit.purefunction
 def ll_math_isinf(y):
     return bool(math_isinf(y))
 


More information about the Pypy-commit mailing list