Exemple #1
0
 def malloc_array(itemsize, tid, num_elem):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     _check_typeid(type_id)
     return llop1.do_malloc_varsize_clear(llmemory.GCREF, type_id,
                                          num_elem, self.array_basesize,
                                          itemsize,
                                          self.array_length_ofs, True)
Exemple #2
0
 def malloc_array(itemsize, tid, num_elem):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     _check_typeid(type_id)
     return llop1.do_malloc_varsize_clear(
         llmemory.GCREF,
         type_id, num_elem, self.array_basesize, itemsize,
         self.array_length_ofs, True)
Exemple #3
0
 def malloc_array(itemsize, tid, num_elem):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     _check_typeid(type_id)
     try:
         return llop1.do_malloc_varsize_clear(
             llmemory.GCREF, type_id, num_elem, self.array_basesize,
             itemsize, self.array_length_ofs, True)
     except MemoryError:
         fatalerror("out of memory (from JITted code)")
         return lltype.nullptr(llmemory.GCREF.TO)
Exemple #4
0
 def malloc_basic(size, tid):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     has_finalizer = bool(tid & (1 << 16))
     _check_typeid(type_id)
     res = llop1.do_malloc_fixedsize_clear(llmemory.GCREF, type_id,
                                           size, True, has_finalizer,
                                           False)
     #llop.debug_print(lltype.Void, "\tmalloc_basic", size, type_id,
     #                 "-->", res)
     return res
Exemple #5
0
 def malloc_basic(size, tid):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     has_finalizer = bool(tid & (1<<16))
     _check_typeid(type_id)
     res = llop1.do_malloc_fixedsize_clear(llmemory.GCREF,
                                           type_id, size, True,
                                           has_finalizer, False)
     #llop.debug_print(lltype.Void, "\tmalloc_basic", size, type_id,
     #                 "-->", res)
     return res
Exemple #6
0
 def malloc_array(itemsize, tid, num_elem):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     _check_typeid(type_id)
     try:
         return llop1.do_malloc_varsize_clear(
             llmemory.GCREF,
             type_id, num_elem, self.array_basesize, itemsize,
             self.array_length_ofs, True)
     except MemoryError:
         fatalerror("out of memory (from JITted code)")
         return lltype.nullptr(llmemory.GCREF.TO)
Exemple #7
0
 def malloc_basic(size, tid):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     has_finalizer = bool(tid & (1 << 16))
     _check_typeid(type_id)
     try:
         res = llop1.do_malloc_fixedsize_clear(llmemory.GCREF, type_id,
                                               size, True,
                                               has_finalizer, False)
     except MemoryError:
         fatalerror("out of memory (from JITted code)")
         res = lltype.nullptr(llmemory.GCREF.TO)
     #llop.debug_print(lltype.Void, "\tmalloc_basic", size, type_id,
     #                 "-->", res)
     return res
Exemple #8
0
 def malloc_basic(size, tid):
     type_id = llop.extract_ushort(rffi.USHORT, tid)
     has_finalizer = bool(tid & (1<<16))
     _check_typeid(type_id)
     try:
         res = llop1.do_malloc_fixedsize_clear(llmemory.GCREF,
                                               type_id, size, True,
                                               has_finalizer, False)
     except MemoryError:
         fatalerror("out of memory (from JITted code)")
         res = lltype.nullptr(llmemory.GCREF.TO)
     #llop.debug_print(lltype.Void, "\tmalloc_basic", size, type_id,
     #                 "-->", res)
     return res