Author: Maciej Fijalkowski <fij...@gmail.com> Branch: result-in-resops Changeset: r56441:150214cc2e9a Date: 2012-07-25 01:11 +0200 http://bitbucket.org/pypy/pypy/changeset/150214cc2e9a/
Log: success in running some tests with optimizations on diff --git a/pypy/jit/metainterp/optimizeopt/heap.py b/pypy/jit/metainterp/optimizeopt/heap.py --- a/pypy/jit/metainterp/optimizeopt/heap.py +++ b/pypy/jit/metainterp/optimizeopt/heap.py @@ -257,11 +257,7 @@ opnum == rop.COPYSTRCONTENT or # no effect on GC struct/array opnum == rop.COPYUNICODECONTENT): # no effect on GC struct/array return - if (opnum == rop.CALL or - opnum == rop.CALL_PURE or - opnum == rop.CALL_MAY_FORCE or - opnum == rop.CALL_RELEASE_GIL or - opnum == rop.CALL_ASSEMBLER): + if opnum in opgroups.ALLCALLS: if opnum == rop.CALL_ASSEMBLER: self._seen_guard_not_invalidated = False else: diff --git a/pypy/jit/metainterp/optimizeopt/optimizer.py b/pypy/jit/metainterp/optimizeopt/optimizer.py --- a/pypy/jit/metainterp/optimizeopt/optimizer.py +++ b/pypy/jit/metainterp/optimizeopt/optimizer.py @@ -528,7 +528,10 @@ return None else: self.ensure_imported(value) - return value.force_box(self) + value = value.force_box(self) + if value is v: + return None + return value @specialize.argtype(0) def _emit_operation(self, op): diff --git a/pypy/jit/metainterp/resoperation.py b/pypy/jit/metainterp/resoperation.py --- a/pypy/jit/metainterp/resoperation.py +++ b/pypy/jit/metainterp/resoperation.py @@ -899,6 +899,12 @@ if not k.startswith('__'): setattr(rop_lowercase, k.lower(), v) + ALLCALLS = [] + for k, v in rop.__dict__.iteritems(): + if k.startswith('CALL'): + ALLCALLS.append(v) + opgroups.ALLCALLS = tuple(ALLCALLS) + def get_base_class(mixin, tpmixin, base): try: return get_base_class.cache[(mixin, tpmixin, base)] _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit