Sven Hager avatar Sven Hager committed 9b1bc84

do not copy lists

Comments (0)

Files changed (2)

pypy/jit/backend/ppc/helper/regalloc.py

 
 def prepare_binary_int_op():
     def f(self, op):
-        boxes = list(op.getarglist())
+        boxes = op.getarglist()
         b0, b1 = boxes
 
         reg1 = self._ensure_value_is_boxed(b0, forbidden_vars=boxes)

pypy/jit/backend/ppc/regalloc.py

     def prepare_loop(self, inputargs, operations):
         self._prepare(inputargs, operations)
         self._set_initial_bindings(inputargs)
-        self.possibly_free_vars(list(inputargs))
+        self.possibly_free_vars(inputargs)
 
     def prepare_bridge(self, inputargs, arglocs, ops):
         self._prepare(inputargs, ops)
     prepare_guard_not_invalidated = prepare_guard_no_overflow
 
     def prepare_guard_exception(self, op):
-        boxes = list(op.getarglist())
+        boxes = op.getarglist()
         arg0 = ConstInt(rffi.cast(lltype.Signed, op.getarg(0).getint()))
         loc = self._ensure_value_is_boxed(arg0)
         loc1 = self.get_scratch_reg(INT, boxes)
         return arglocs
 
     def prepare_guard_value(self, op):
-        boxes = list(op.getarglist())
+        boxes = op.getarglist()
         a0, a1 = boxes
         l0 = self._ensure_value_is_boxed(a0, boxes)
         l1 = self._ensure_value_is_boxed(a1, boxes)
 
     def prepare_guard_class(self, op):
         assert isinstance(op.getarg(0), Box)
-        boxes = list(op.getarglist())
+        boxes = op.getarglist()
         x = self._ensure_value_is_boxed(boxes[0], boxes)
         y = self.get_scratch_reg(REF, forbidden_vars=boxes)
         y_val = rffi.cast(lltype.Signed, op.getarg(1).getint())
         return []
 
     def prepare_setfield_gc(self, op):
-        boxes = list(op.getarglist())
+        boxes = op.getarglist()
         a0, a1 = boxes
         ofs, size, sign = unpack_fielddescr(op.getdescr())
         base_loc = self._ensure_value_is_boxed(a0, boxes)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.