Author: Ronan Lamy <[email protected]>
Branch: type_system-cleanup
Changeset: r80068:2349f1dae6a1
Date: 2015-10-08 23:40 +0100
http://bitbucket.org/pypy/pypy/changeset/2349f1dae6a1/

Log:    Kill LowLevelTypeSystem.check_null

diff --git a/rpython/rtyper/rmodel.py b/rpython/rtyper/rmodel.py
--- a/rpython/rtyper/rmodel.py
+++ b/rpython/rtyper/rmodel.py
@@ -239,7 +239,8 @@
         if hop.s_result.is_constant():
             return hop.inputconst(Bool, hop.s_result.const)
         else:
-            return hop.rtyper.type_system.check_null(self, hop)
+            vlist = hop.inputargs(self)
+            return hop.genop('ptr_nonzero', vlist, resulttype=Bool)
 
 
 class IteratorRepr(Repr):
diff --git a/rpython/rtyper/typesystem.py b/rpython/rtyper/typesystem.py
--- a/rpython/rtyper/typesystem.py
+++ b/rpython/rtyper/typesystem.py
@@ -8,11 +8,6 @@
 class LowLevelTypeSystem(object):
     name = "lltypesystem"
 
-    def check_null(self, repr, hop):
-        # None is a nullptr, which is false; everything else is true.
-        vlist = hop.inputargs(repr)
-        return hop.genop('ptr_nonzero', vlist, resulttype=lltype.Bool)
-
     def generic_is(self, robj1, robj2, hop):
         roriginal1 = robj1
         roriginal2 = robj2
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to