[Patches] [Patch #102337] revised CALL_FUNCTION implementation
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 9 Nov 2000 05:59:30 -0800
Patch #102337 has been updated.
Project: python
Category: core (C code)
Status: Open
Summary: revised CALL_FUNCTION implementation
Follow-Ups:
Date: 2000-Nov-08 16:08
By: jhylton
Comment:
This is a first draft patch that revises the CALL_FUNCTION implementation. The first part of the revision breaks the long inline implementation into a series of function calls. Each of the function calls has some small local optimizations (e.g. PyMethod_GET_SELF instead of PyMethod_GetSelf).
One problem that needs to be figured out is how these functions can cleanly access the stack_pointer local var of eval_code2. The current approach is a bit messy.
-------------------------------------------------------
Date: 2000-Nov-08 16:29
By: jhylton
Comment:
A trivial fix to the logic keeps keyword arguments fast.
-------------------------------------------------------
Date: 2000-Nov-09 01:50
By: lemburg
Comment:
The patch looks ok, but I'm still missing the cleanup of the
PyEval_CallXXX() APIs which the patch I sent you included.
Some cosmetic issues:
1. your new APIs should be static and start with an underscore
(e.g. _Py_CallFunctions)
2. you should add some "register" markers to the function call
definitions -- this helps compilers such as gcc when inlining functions
-------------------------------------------------------
Date: 2000-Nov-09 05:59
By: none
Comment:
Haven't seen the patch yet, but one remark on static functions: these should *not* have an underscore and *not* have a _Py_ prefix.
The _Py_ prefix is for stuff that cannot be static, because it needs to be called from another file, but is not intended to be a public API (so it could disappear or change in a future version without breaking user code).
There are a few exceptions (_Py_ functions that are part of the public API); these are either historical accidents or need to be used with great care only by wizards.
--Guido
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=102337&group_id=5470