[pypy-commit] pypy kill-ootype: Fix llinterp

rlamy noreply at buildbot.pypy.org
Sun Jul 7 16:20:31 CEST 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: kill-ootype
Changeset: r65256:cd048265c9ab
Date: 2013-07-07 16:19 +0200
http://bitbucket.org/pypy/pypy/changeset/cd048265c9ab/

Log:	Fix llinterp

diff --git a/rpython/rtyper/llinterp.py b/rpython/rtyper/llinterp.py
--- a/rpython/rtyper/llinterp.py
+++ b/rpython/rtyper/llinterp.py
@@ -241,16 +241,6 @@
                 assert False, "type error: %r val from %r var/const" % (lltype.typeOf(val), varorconst.concretetype)
         return val
 
-    def getval_or_subop(self, varorsubop):
-        from rpython.translator.oosupport.treebuilder import SubOperation
-        if isinstance(varorsubop, SubOperation):
-            self.eval_operation(varorsubop.op)
-            resultval = self.getval(varorsubop.op.result)
-            del self.bindings[varorsubop.op.result] # XXX hack
-            return resultval
-        else:
-            return self.getval(varorsubop)
-
     # _______________________________________________________
     # other helpers
     def getoperationhandler(self, opname):
@@ -406,7 +396,7 @@
         if getattr(ophandler, 'specialform', False):
             retval = ophandler(*operation.args)
         else:
-            vals = [self.getval_or_subop(x) for x in operation.args]
+            vals = [self.getval(x) for x in operation.args]
             if getattr(ophandler, 'need_result_type', False):
                 vals.insert(0, operation.result.concretetype)
             try:


More information about the pypy-commit mailing list