Author: Armin Rigo <ar...@tunes.org> Branch: jitframe-on-heap Changeset: r60660:0e72a368a1b0 Date: 2013-01-29 10:44 +0100 http://bitbucket.org/pypy/pypy/changeset/0e72a368a1b0/
Log: Future-proofing code. diff --git a/rpython/jit/backend/llsupport/gc.py b/rpython/jit/backend/llsupport/gc.py --- a/rpython/jit/backend/llsupport/gc.py +++ b/rpython/jit/backend/llsupport/gc.py @@ -139,7 +139,6 @@ """ Allocate a new frame, overwritten by tests """ frame = jitframe.JITFRAME.allocate(frame_info) - llop.gc_assume_young_pointers(lltype.Void, frame) return frame class JitFrameDescrs: diff --git a/rpython/jit/backend/llsupport/llmodel.py b/rpython/jit/backend/llsupport/llmodel.py --- a/rpython/jit/backend/llsupport/llmodel.py +++ b/rpython/jit/backend/llsupport/llmodel.py @@ -59,18 +59,13 @@ frame = lltype.cast_opaque_ptr(jitframe.JITFRAMEPTR, frame) assert size <= frame.jf_frame_info.jfi_frame_depth new_frame = jitframe.JITFRAME.allocate(frame.jf_frame_info) - # XXX now we know, rewrite this - # YYY it doesn't matter at all, it's fine that way too - # we need to do this, because we're not sure what things - # are GC pointers and which ones are not - llop.gc_writebarrier_before_copy(lltype.Bool, frame, new_frame, - 0, 0, len(frame.jf_frame)) i = 0 while i < len(frame.jf_frame): new_frame.jf_frame[i] = frame.jf_frame[i] i += 1 new_frame.jf_savedata = frame.jf_savedata # all other fields are empty + llop.gc_assume_young_pointers(lltype.Void, new_frame) return lltype.cast_opaque_ptr(llmemory.GCREF, new_frame) if not translate_support_code: diff --git a/rpython/jit/backend/x86/runner.py b/rpython/jit/backend/x86/runner.py --- a/rpython/jit/backend/x86/runner.py +++ b/rpython/jit/backend/x86/runner.py @@ -1,6 +1,7 @@ import py from rpython.rlib.unroll import unrolling_iterable from rpython.rtyper.lltypesystem import lltype, llmemory, rffi +from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.llinterp import LLInterpreter from rpython.rlib.objectmodel import specialize from rpython.rlib.jit_hooks import LOOP_RUN_CONTAINER @@ -136,6 +137,9 @@ assert kind == history.REF self.set_ref_value(ll_frame, num, arg) num += WORD + # no GC operation between gc_assume_young_pointers and + # the actual call to assembler! + llop.gc_assume_young_pointers(lltype.Void, frame) ll_frame = func(ll_frame) finally: if not self.translate_support_code: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit