Commits

Armin Rigo  committed d40bf7f

more fixes

  • Participants
  • Parent commits 2ba13ee
  • Branches op_malloc_gc

Comments (0)

Files changed (2)

File pypy/jit/backend/llsupport/gc.py

 from pypy.rlib.debug import fatalerror
 from pypy.rlib.rarithmetic import ovfcheck
 from pypy.rpython.lltypesystem import lltype, llmemory, rffi, rclass, rstr
-from pypy.rpython.lltypesystem import llgroup, llarena
+from pypy.rpython.lltypesystem import llgroup
 from pypy.rpython.lltypesystem.lloperation import llop
 from pypy.rpython.annlowlevel import llhelper
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
                                malloc_array_nonstandard,
                                [lltype.Signed] * 5)
 
+        str_type_id    = self.str_descr.tid
+        str_basesize   = self.str_descr.basesize
+        str_itemsize   = self.str_descr.itemsize
+        str_ofs_length = self.str_descr.lendescr.offset
+        unicode_type_id    = self.unicode_descr.tid
+        unicode_basesize   = self.unicode_descr.basesize
+        unicode_itemsize   = self.unicode_descr.itemsize
+        unicode_ofs_length = self.unicode_descr.lendescr.offset
+
         def malloc_str(length):
             return llop1.do_malloc_varsize_clear(
                 llmemory.GCREF,
         self.gcrootmap.freeing_block(start, stop)
 
     def get_malloc_slowpath_addr(self):
-        return self.c_malloc_nursery_fn.value
+        return self.get_malloc_fn_addr('malloc_nursery')
 
 # ____________________________________________________________
 

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

         If that fails, generate a plain CALL_MALLOC_GC instead.
         """
         if not self.gc_ll_descr.can_use_nursery_malloc(size):
-            return self.gen_malloc_fixedsize(size, v_result)
+            self.gen_malloc_fixedsize(size, v_result)
+            return
         #
         size = self.round_up_for_allocation(size)
         op = None
         self._previous_size = size
         self._v_last_malloced_nursery = v_result
         self.recent_mallocs[v_result] = None
-        return True
 
     def gen_initialize_tid(self, v_newgcobj, tid):
         if self.gc_ll_descr.fielddescr_tid is not None:
 
     def round_up_for_allocation(self, size):
         if self.gc_ll_descr.translate_support_code:
+            from pypy.rpython.lltypesystem import llarena
             return llarena.round_up_for_allocation(
                 size, self.gc_ll_descr.minimal_size_in_nursery)
         else: