Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel/fcall.c optimizations #843

Merged
merged 23 commits into from Jul 15, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Keep clang happy
  • Loading branch information
sjinks committed Jul 14, 2013
commit 80df8715e94df20217c5dc1fa12293776735d2e1
19 changes: 7 additions & 12 deletions ext/kernel/fcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ static inline int phalcon_find_scope(zend_class_entry *ce, char *method_name, in
}

if (!lower) {
if (lcname) {
efree(lcname);
}
efree(lcname);
}

return FAILURE;
Expand All @@ -95,10 +93,7 @@ static inline int phalcon_find_parent_scope(zend_class_entry *ce, const char *ac
ce = ce->parent;
}

if (lcname) {
efree(lcname);
}

efree(lcname);
return FAILURE;
}

Expand Down Expand Up @@ -532,7 +527,7 @@ int phalcon_call_method_five_params(zval *return_value, zval *object, char *meth
/**
* Call single static function that requires an arbitrary number of parameters
*/
inline int phalcon_call_static_func_params(zval *return_value, char *class_name, int class_length, char *method_name, int method_length, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){
static inline int phalcon_call_static_func_params(zval *return_value, char *class_name, int class_length, char *method_name, int method_length, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){

zval *fn, *fn_class, *fn_method;
int status;
Expand Down Expand Up @@ -600,7 +595,7 @@ inline int phalcon_call_static_func_params(zval *return_value, char *class_name,
/**
* Call single static function which not requires parameters
*/
inline int phalcon_call_static_func(zval *return_value, char *class_name, int class_length, char *method_name, int method_length, int noreturn TSRMLS_DC){
static inline int phalcon_call_static_func(zval *return_value, char *class_name, int class_length, char *method_name, int method_length, int noreturn TSRMLS_DC){

zval *fn, *fn_class, *fn_method;
int status = FAILURE;
Expand Down Expand Up @@ -776,7 +771,7 @@ int phalcon_call_self_func(zval *return_value, zval *object, char *method_name,
/**
* Call self-class static function which requires parameters
*/
inline int phalcon_call_self_func_params(zval *return_value, zval *object, char *method_name, int method_len, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){
static inline int phalcon_call_self_func_params(zval *return_value, zval *object, char *method_name, int method_len, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){

int success;
zend_class_entry *ce, *active_scope = NULL;
Expand Down Expand Up @@ -936,7 +931,7 @@ int phalcon_call_static_zval_func(zval *return_value, zval *mixed_name, zval *me
/**
* Call single static function on a zval which requires parameters
*/
inline int phalcon_call_static_zval_func_params(zval *return_value, zval *mixed_name, zval *method, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){
static inline int phalcon_call_static_zval_func_params(zval *return_value, zval *mixed_name, zval *method, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){

zval *fn;
int status = FAILURE;
Expand Down Expand Up @@ -1007,7 +1002,7 @@ inline int phalcon_call_static_zval_func_params(zval *return_value, zval *mixed_
/**
* Call single static function on a zval which requires parameters
*/
inline int phalcon_call_static_zval_str_func_params(zval *return_value, zval *mixed_name, char *method_name, int method_len, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){
static inline int phalcon_call_static_zval_str_func_params(zval *return_value, zval *mixed_name, char *method_name, int method_len, zend_uint param_count, zval *params[], int noreturn TSRMLS_DC){

zval *fn;
int status = FAILURE;
Expand Down