Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r61826:2e268ed9c59d
Date: 2013-02-26 13:23 +0200
http://bitbucket.org/pypy/pypy/changeset/2e268ed9c59d/
Log: merge
diff --git a/rpython/annotator/builtin.py b/rpython/annotator/builtin.py
--- a/rpython/annotator/builtin.py
+++ b/rpython/annotator/builtin.py
@@ -405,7 +405,7 @@
from rpython.rtyper.lltypesystem import lltype
def malloc(s_T, s_n=None, s_flavor=None, s_zero=None, s_track_allocation=None,
- s_add_memory_pressure=None, s_immortal=None):
+ s_add_memory_pressure=None):
assert (s_n is None or s_n.knowntype == int
or issubclass(s_n.knowntype, rpython.rlib.rarithmetic.base_int))
assert s_T.is_constant()
diff --git a/rpython/jit/backend/llsupport/assembler.py
b/rpython/jit/backend/llsupport/assembler.py
--- a/rpython/jit/backend/llsupport/assembler.py
+++ b/rpython/jit/backend/llsupport/assembler.py
@@ -85,7 +85,8 @@
debug_stop('jit-backend-counts')
# when finishing, we only have one value at [0], the rest dies
self.gcmap_for_finish = lltype.malloc(jitframe.GCMAP, 1,
- flavor='raw', immortal=True)
+ flavor='raw',
+ track_allocation=False)
self.gcmap_for_finish[0] = r_uint(1)
def rebuild_faillocs_from_descr(self, descr, inputargs):
diff --git a/rpython/jit/backend/x86/assembler.py
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -1967,12 +1967,11 @@
self._push_all_regs_to_frame(mc, [], withfloats)
if exc:
- # We might have an exception pending. Load it into ebx
- # (this is a register saved across calls, both if 32 or 64)
+ # We might have an exception pending. Load it into ebx...
mc.MOV(ebx, heap(self.cpu.pos_exc_value()))
mc.MOV(heap(self.cpu.pos_exception()), imm0)
mc.MOV(heap(self.cpu.pos_exc_value()), imm0)
- # save ebx into 'jf_guard_exc'
+ # ...and save ebx into 'jf_guard_exc'
offset = self.cpu.get_ofs_of_frame_field('jf_guard_exc')
mc.MOV_br(offset, ebx.value)
@@ -1986,7 +1985,7 @@
mc.MOV_br(ofs2, eax.value)
mc.POP(eax)
mc.MOV_br(ofs, eax.value)
- # store the gc pattern
+ # the return value is the jitframe
mc.MOV_rr(eax.value, ebp.value)
self._call_footer()
diff --git a/rpython/memory/gc/minimark.py b/rpython/memory/gc/minimark.py
--- a/rpython/memory/gc/minimark.py
+++ b/rpython/memory/gc/minimark.py
@@ -639,8 +639,14 @@
# The nursery might not be empty now, because of
# execute_finalizers(). If it is almost full again,
# we need to fix it with another call to minor_collection().
- if self.nursery_free + totalsize > self.nursery_real_top:
- self.minor_collection()
+ if self.nursery_free + totalsize > self.nursery_top:
+ #
+ if self.nursery_free + totalsize > self.nursery_real_top:
+ self.minor_collection()
+ # then the nursery is empty
+ else:
+ # we just need to clean up a bit more of the nursery
+ self.move_nursery_top(totalsize)
#
result = self.nursery_free
self.nursery_free = result + totalsize
diff --git a/rpython/rtyper/lltypesystem/opimpl.py
b/rpython/rtyper/lltypesystem/opimpl.py
--- a/rpython/rtyper/lltypesystem/opimpl.py
+++ b/rpython/rtyper/lltypesystem/opimpl.py
@@ -529,7 +529,7 @@
assert A.TO.OF.TO._gckind == 'gc'
else:
assert isinstance(A.TO, lltype.GcStruct)
- assert hasattr(A.TO, '_arrayfld')
+ assert A.TO._arrayfld is not None
assert type(source_start) is int
assert type(dest_start) is int
assert type(length) is int
diff --git a/rpython/rtyper/rbuiltin.py b/rpython/rtyper/rbuiltin.py
--- a/rpython/rtyper/rbuiltin.py
+++ b/rpython/rtyper/rbuiltin.py
@@ -357,7 +357,7 @@
# annotation of low-level types
def rtype_malloc(hop, i_flavor=None, i_zero=None, i_track_allocation=None,
- i_add_memory_pressure=None, i_immortal=None):
+ i_add_memory_pressure=None):
assert hop.args_s[0].is_constant()
vlist = [hop.inputarg(lltype.Void, arg=0)]
opname = 'malloc'
@@ -366,10 +366,9 @@
(i_flavor, lltype.Void),
(i_zero, None),
(i_track_allocation, None),
- (i_add_memory_pressure, None),
- (i_immortal, None))
+ (i_add_memory_pressure, None))
(v_flavor, v_zero, v_track_allocation,
- v_add_memory_pressure, v_immortal) = kwds_v
+ v_add_memory_pressure) = kwds_v
flags = {'flavor': 'gc'}
if v_flavor is not None:
flags['flavor'] = v_flavor.value
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit