Commits

Maciej Fijalkowski committed eff89c9

fix types

Comments (0)

Files changed (3)

rpython/jit/backend/llsupport/gc.py

 from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rclass, rstr
 from rpython.rtyper.lltypesystem import llgroup
 from rpython.rtyper.lltypesystem.lloperation import llop
-from rpython.rtyper.annlowlevel import llhelper
+from rpython.rtyper.annlowlevel import llhelper, cast_instance_to_gcref
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.jit.codewriter import heaptracker
 from rpython.jit.metainterp.history import ConstPtr, AbstractDescr
                 rgc._make_sure_does_not_move(p)
                 gcrefs_output_list.append(p)
         if op.is_guard() or op.getopnum() == rop.FINISH:
-            rgc._make_sure_does_not_move(op.getdescr())
+            rgc._make_sure_does_not_move(cast_instance_to_gcref(op.getdescr()))
             gcrefs_output_list.append(op.getdescr())
 
     def rewrite_assembler(self, cpu, operations, gcrefs_output_list):

rpython/jit/backend/llsupport/rewrite.py

         lgt_box = history.BoxInt()
         frame = history.BoxPtr()
         jfi = loop_token.compiled_loop_token.frame_info
-        rgc._make_sure_does_not_move(jfi)
         llref = lltype.cast_opaque_ptr(llmemory.GCREF, jfi)
+        rgc._make_sure_does_not_move(llref)
         op0 = ResOperation(rop.GETFIELD_GC, [history.ConstPtr(llref)], lgt_box,
                            descr=descrs.jfi_frame_depth)
         self.newops.append(op0)

rpython/jit/backend/x86/assembler.py

         self._call_header_with_stack_check()
         operations = regalloc.prepare_loop(inputargs, operations, looptoken,
                                            clt.allgcrefs)
-        rgc._make_sure_does_not_move(clt.frame_info)
+        rgc._make_sure_does_not_move(lltype.cast_opaque_ptr(llmemory.GCREF,
+                                                            clt.frame_info))
         looppos = self.mc.get_relative_pos()
         looptoken._x86_loop_code = looppos
         frame_depth = self._assemble(regalloc, inputargs, operations)