Author: Maciej Fijalkowski <fij...@gmail.com> Branch: missing-jit-operations Changeset: r59636:dece178e0a35 Date: 2012-12-31 13:33 +0200 http://bitbucket.org/pypy/pypy/changeset/dece178e0a35/
Log: another missing operation diff --git a/pypy/jit/codewriter/jtransform.py b/pypy/jit/codewriter/jtransform.py --- a/pypy/jit/codewriter/jtransform.py +++ b/pypy/jit/codewriter/jtransform.py @@ -487,6 +487,7 @@ rewrite_op_cast_uint_to_float = _do_builtin_call rewrite_op_weakref_create = _do_builtin_call rewrite_op_weakref_deref = _do_builtin_call + rewrite_op_gc_add_memory_pressure = _do_builtin_call # ---------- # getfield/setfield/mallocs etc. diff --git a/pypy/jit/codewriter/support.py b/pypy/jit/codewriter/support.py --- a/pypy/jit/codewriter/support.py +++ b/pypy/jit/codewriter/support.py @@ -653,6 +653,9 @@ return llop.weakref_deref(lltype.Ptr(TP), obj) _ll_1_weakref_deref.need_result_type = True + def _ll_1_gc_add_memory_pressure(num): + llop.gc_add_memory_pressure(lltype.Void, num) + class OOtypeHelpers: # ---------- dict ---------- diff --git a/pypy/jit/metainterp/test/test_ajit.py b/pypy/jit/metainterp/test/test_ajit.py --- a/pypy/jit/metainterp/test/test_ajit.py +++ b/pypy/jit/metainterp/test/test_ajit.py @@ -3971,3 +3971,13 @@ return w().x + a.x assert self.interp_operations(f, [3]) == 6 + + def test_gc_add_memory_pressure(self): + from pypy.rlib import rgc + + def f(): + rgc.add_memory_pressure(1234) + return 3 + + self.interp_operations(f, []) + _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit