Commit 0c23fb81 authored by Stefan Behnel's avatar Stefan Behnel

move increfs closer to the corresponding variable usages in C code (just in...

move increfs closer to the corresponding variable usages in C code (just in case it helps the C compiler to generate better code)

--HG--
extra : amend_source : 93bba856cb71e61c56335b3687337f5c68b62f2c
parent 6b4058c5
...@@ -4863,9 +4863,9 @@ class PyMethodCallNode(SimpleCallNode): ...@@ -4863,9 +4863,9 @@ class PyMethodCallNode(SimpleCallNode):
# the following is always true in Py3 (kept only for safety), # the following is always true in Py3 (kept only for safety),
# but is false for unbound methods in Py2 # but is false for unbound methods in Py2
code.putln("if (likely(%s)) {" % self_arg) code.putln("if (likely(%s)) {" % self_arg)
code.put("PyObject* function = PyMethod_GET_FUNCTION(%s); " % function) code.putln("PyObject* function = PyMethod_GET_FUNCTION(%s);" % function)
code.put_incref("function", py_object_type)
code.put_incref(self_arg, py_object_type) code.put_incref(self_arg, py_object_type)
code.put_incref("function", py_object_type)
# free method object as early to possible to enable reuse from CPython's freelist # free method object as early to possible to enable reuse from CPython's freelist
code.put_decref_set(function, "function") code.put_decref_set(function, "function")
if len(args) > 1: if len(args) > 1:
......
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