Commit 51c36af6 authored by Stefan Behnel's avatar Stefan Behnel

Add obvious branch hint.

parent d42afbfb
...@@ -5671,7 +5671,7 @@ class SimpleCallNode(CallNode): ...@@ -5671,7 +5671,7 @@ class SimpleCallNode(CallNode):
and self.type.is_int and self.type.is_int
and self.type.signed and self.type.signed
and self.function.result() in ('abs', 'labs', '__Pyx_abs_longlong')): and self.function.result() in ('abs', 'labs', '__Pyx_abs_longlong')):
goto_error = 'if (%s < 0) { PyErr_SetString(PyExc_OverflowError, "value too large"); %s; }' % (self.result(), code.error_goto(self.pos)) goto_error = 'if (unlikely(%s < 0)) { PyErr_SetString(PyExc_OverflowError, "value too large"); %s; }' % (self.result(), code.error_goto(self.pos))
elif exc_checks: elif exc_checks:
goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos) goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment