| 1 |
|
| 2 |
|
| 3 |
from rpython.rtyper.lltypesystem.lltype import malloc, free, typeOf |
| 4 |
from rpython.rtyper.lltypesystem.llmemory import weakref_create, weakref_deref |
| 5 |
|
| 6 |
setfield = setattr |
| 7 |
from operator import setitem as setarrayitem |
| 8 |
from rpython.rlib.rgc import can_move, collect, enable, disable, isenabled, add_memory_pressure, collect_step |
| 9 |
|
| 10 |
def setinterior(toplevelcontainer, inneraddr, INNERTYPE, newvalue, |
| 11 |
offsets=None): |
| 12 |
assert typeOf(newvalue) == INNERTYPE |
| 13 |
|
| 14 |
inneraddr.ref()[0] = newvalue |
| 15 |
|
| 16 |
from rpython.rtyper.lltypesystem.lltype import cast_ptr_to_int as gc_id |
| 17 |
|
| 18 |
def weakref_create_getlazy(objgetter): |
| 19 |
return weakref_create(objgetter()) |
| 20 |
|
| 21 |
|
| 22 |
def shrink_array(p, smallersize): |
| 23 |
return False |
| 24 |
|
| 25 |
|
| 26 |
def thread_run(): |
| 27 |
pass |
| 28 |
|
| 29 |
def thread_start(): |
| 30 |
pass |
| 31 |
|
| 32 |
def thread_die(): |
| 33 |
pass |
| 34 |
|
| 35 |
def pin(obj): |
| 36 |
return False |
| 37 |
|
| 38 |
def unpin(obj): |
| 39 |
raise AssertionError("pin() always returns False, " |
| 40 |
"so unpin() should not be called") |
| 41 |
|
| 42 |
def _is_pinned(obj): |
| 43 |
return False |