Commits

Ronan Lamy  committed b5e9fab

remove some uses of FSFrame.do_operation()

  • Participants
  • Parent commits 6c95c23
  • Branches less-stringly-ops

Comments (0)

Files changed (4)

File rpython/flowspace/flowcontext.py

 
     def PRINT_ITEM(self, oparg):
         w_item = self.popvalue()
-        w_s = self.do_operation('str', w_item)
+        w_s = self.space.str(w_item)
         self.space.appcall(rpython_print_item, w_s)
 
     def PRINT_NEWLINE(self, oparg):

File rpython/flowspace/objspace.py

             if not self.frame.guessbool(self.bool(w_correct)):
                 w_exc = self.exc_from_raise(self.w_ValueError, self.w_None)
                 raise Raise(w_exc)
-            return [self.frame.do_operation('getitem', w_iterable, const(i))
+            return [self.getitem(w_iterable, const(i))
                         for i in range(expected_length)]
 
     # ____________________________________________________________
     def appcall(self, func, *args_w):
         """Call an app-level RPython function directly"""
         w_func = const(func)
-        return self.frame.do_operation('simple_call', w_func, *args_w)
+        return op.simple_call(w_func, *args_w).eval(self.frame)
 
     def call(self, w_callable, args):
         if isinstance(w_callable, Constant):

File rpython/flowspace/specialcase.py

 def sc_isinstance(space, w_instance, w_type):
     if w_instance.foldable() and w_type.foldable():
         return const(isinstance(w_instance.value, w_type.value))
-    return space.frame.do_operation('simple_call', const(isinstance),
-            w_instance, w_type)
+    return space.appcall(isinstance, w_instance, w_type)
 
 @register_flow_sc(getattr)
 def sc_getattr(space, w_obj, w_index, w_default=None):
     if w_default is not None:
-        return space.frame.do_operation('simple_call', const(getattr), w_obj,
-                                        w_index, w_default)
+        return space.appcall(getattr, w_obj, w_index, w_default)
     else:
         return space.getattr(w_obj, w_index)
 

File rpython/rlib/rarithmetic.py

     # show up in the flow graphs at all)
     if isinstance(w_value, Constant):
         return Constant(r_uint(w_value.value))
-    return space.frame.do_operation('simple_call', const(r_uint), w_value)
+    return space.appcall(r_uint, w_value)
 
 
 r_longlong = build_int('r_longlong', True, 64)