Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: guard-compatible Changeset: r86079:464652309dcc Date: 2016-06-30 19:35 +0200 http://bitbucket.org/pypy/pypy/changeset/464652309dcc/
Log: fix a bug around logging ops diff --git a/rpython/jit/metainterp/compile.py b/rpython/jit/metainterp/compile.py --- a/rpython/jit/metainterp/compile.py +++ b/rpython/jit/metainterp/compile.py @@ -1136,6 +1136,9 @@ assert isinstance(newdescr, GuardCompatibleDescr) compat_cond = newdescr._compatibility_conditions self.other_compat_conditions.append(compat_cond) + if not compat_cond: + assert self.fallback_jump_target == 0 # this can never happen twice + self.fallback_jump_target = -1 asminfo = ResumeGuardDescr.compile_and_attach( self, metainterp, new_loop, orig_inputargs) # note that the backend will not patch the switch at all, so it is @@ -1143,7 +1146,7 @@ if compat_cond: compat_cond.jump_target = asminfo.asmaddr else: - assert self.fallback_jump_target == 0 # this can never happen twice + assert self.fallback_jump_target == -1 # this can never happen twice self.fallback_jump_target = asminfo.asmaddr return asminfo diff --git a/rpython/jit/metainterp/logger.py b/rpython/jit/metainterp/logger.py --- a/rpython/jit/metainterp/logger.py +++ b/rpython/jit/metainterp/logger.py @@ -89,7 +89,7 @@ "with", len(operations), "ops") logops = self._make_log_operations(memo) if isinstance(descr, GuardCompatibleDescr): - if descr.fallback_jump_target == 0: + if descr.fallback_jump_target != -1: # this means it's the last attached guard ccond = descr.other_compat_conditions[-1] argrepr = logops.repr_of_arg( _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit