Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c

From: Date: Thu, 07 Aug 2003 07:41:21 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1616@lists.php.net to get a copy of this message
Hello Zeev, while i looked into this more detailed i have two questions: 1) Why don't you only store the really relevant info in zend_fcall_info_cache? At the moment it is: typedef struct _zend_fcall_info_cache { zend_bool initialized; zend_function *function_handler; zend_class_entry *calling_scope; zval **object_pp; } zend_fcall_info_cache; But object_pp can be taken from zend_fcall_info and then there are only two pointers left. Or to say it different: It's a bit weired that the cach info overwrites the object_pp in the zend_fcall_info struct. Also i think that checking function_handler!=NULL from the remaining would be enough because you don't do a partial initialization of the cache info and the function_handler is always needed. Having said this the following cut down would be enough: typedef struct _zend_fcall_info_cache { zend_function *function_handler; zend_class_entry *calling_scope; } zend_fcall_info_cache; And this looks much like a nice function/method pointer. 2) The zend_fcall_info struct only takes an argument function_name of type zval. For some things i have in mind this is overkill. A possibility to provide the function name in a char* would be much faster there. And since one could easily put the char* from the zval into the struct this is the much better approach from my point of view. Any comments? -- Best regards, Marcus mailto:helly@php.net

« previous php.zend-engine.cvs (#1616) next »