Commits

Alex Gaynor committed 95aad8c

kill some more pyobj related code

Comments (0)

Files changed (3)

pypy/rpython/llinterp.py

             vars.append(op.result)
 
         for v in vars:
-            TYPE = getattr(v, 'concretetype', None)
+            TYPE = v.concretetype
             if isinstance(TYPE, lltype.Ptr) and TYPE.TO._gckind == 'gc':
                 roots.append(_address_of_local_var(self, v))
 

pypy/translator/backendopt/support.py

     return c
 
 def var_needsgc(var):
-    if hasattr(var, 'concretetype'):
-        vartype = var.concretetype
-        return isinstance(vartype, lltype.Ptr) and vartype._needsgc()
-    else:
-        # assume PyObjPtr
-        return True
+    vartype = var.concretetype
+    return isinstance(vartype, lltype.Ptr) and vartype._needsgc()
 
 def find_calls_from(translator, graph, memo=None):
     if memo and graph in memo:

pypy/translator/c/gc.py

     def rtti_type(self):
         return ''
 
-    def OP_GC_PUSH_ALIVE_PYOBJ(self, funcgen, op):
-        expr = funcgen.expr(op.args[0])
-        if expr == 'NULL':
-            return ''
-        return 'Py_XINCREF(%s);' % expr
-
-    def OP_GC_POP_ALIVE_PYOBJ(self, funcgen, op):
-        expr = funcgen.expr(op.args[0])
-        return 'Py_XDECREF(%s);' % expr
-
     def OP_GC_SET_MAX_HEAP_SIZE(self, funcgen, op):
         return ''