Commits

Maciej Fijalkowski committed 5f0381c

a set of oops and typos

  • Participants
  • Parent commits 6dd2630
  • Branches jitframe-on-heap

Comments (0)

Files changed (2)

File rpython/jit/backend/llsupport/llmodel.py

         # the same as normal JITFRAME, however with an array of pointers
         self.refarraydescr = ArrayDescr(ad.basesize, ad.itemsize, ad.lendescr,
                                         FLAG_POINTER)
-        self.floatarraydescr = ArrayDescr(ad.basesize, ad.itemsize, ad.lendescr,
-                                          FLAG_FLOAT)
+        if WORD == 4:
+            self.floatarraydescr = ArrayDescr(ad.basesize, ad.itemsize * 2,
+                                              ad.lendescr, FLAG_FLOAT)
+        else:
+            self.floatarraydescr = ArrayDescr(ad.basesize, ad.itemsize,
+                                              ad.lendescr, FLAG_FLOAT)
         self.setup()
 
     def getarraydescr_for_frame(self, type):

File rpython/jit/backend/llsupport/rewrite.py

                            None, descr=descrs.jf_frame_info)
         self.newops.append(op2)
         arglist = op.getarglist()
-        index = self.cpu.getarryoffset_for_frame()	
+        index = self.cpu.getarryoffset_for_frame()
         for i, arg in enumerate(arglist):
             descr = self.cpu.getarraydescr_for_frame(arg.type)
-            if WORD == 4 and type == history.FLOAT:
+            if WORD == 4 and arg.type == history.FLOAT:
                 self.newops.append(ResOperation(rop.SETARRAYITEM_GC,
                                                 [frame, ConstInt(index // 2),
                                                  arg],
                                                 None, descr))
-                index += 2
+                index += 2 
             else:
                 self.newops.append(ResOperation(rop.SETARRAYITEM_GC,
                                                 [frame, ConstInt(index),