com php-src: FAST_ZPP for hot functions: ext/mysql/ php_mysql.c ext/standard/array.c ext/standard/math. c

From: Date: Wed, 24 Dec 2014 04:07:55 +0000
Subject: com php-src: FAST_ZPP for hot functions: ext/mysql/ php_mysql.c ext/standard/array.c ext/standard/math. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83853@lists.php.net to get a copy of this message
Commit: 3139ba61166fc0406e776ebcf69dd1e7cabe8f6d Author: Xinchen Hui <laruence@php.net> Tue, 23 Dec 2014 02:43:34 -0500 Parents: e46852d2d5b7f2a2b9282978103da3aea36ab07d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3139ba61166fc0406e776ebcf69dd1e7cabe8f6d Log: FAST_ZPP for hot functions Changed paths: M ext/mysql/php_mysql.c M ext/standard/array.c M ext/standard/math.c Diff: diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index af5743c..ff88ace 100644 --- a/ext/mysql/php_mysql..c +++ b/ext/mysql/php_mysql.c @@ -2078,9 +2078,18 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ if (into_object) { zend_string *class_name = NULL; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|Sz", &res, &class_name, &ctor_params) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 3) + Z_PARAM_ZVAL(res) + Z_PARAM_OPTIONAL + Z_PARAM_STR(class_name) + Z_PARAM_ZVAL(ctor_params) + ZEND_PARSE_PARAMETERS_END(); +#endif if (ZEND_NUM_ARGS() < 2) { ce = zend_standard_class_def; @@ -2092,11 +2101,18 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ return; } result_type = MYSQL_ASSOC; - } else - { + } else { +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &res, &result_type) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 2) + Z_PARAM_RESOURCE(res) + Z_PARAM_OPTIONAL + Z_PARAM_LONG(result_type) + ZEND_PARSE_PARAMETERS_END(); +#endif if (!result_type) { /* result_type might have been set outside, so only overwrite when not set */ result_type = MYSQL_BOTH; diff --git a/ext/standard/array.c b/ext/standard/array.c index d236738..e226b62 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -240,9 +240,17 @@ PHP_FUNCTION(ksort) zval *array; zend_long sort_type = PHP_SORT_REGULAR; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) { RETURN_FALSE; } +#else + ZEND_PARSE_PARAMETERS_START(1, 2) + Z_PARAM_ARRAY_EX(array, 0, 1) + Z_PARAM_OPTIONAL + Z_PARAM_LONG(sort_type) + ZEND_PARSE_PARAMETERS_END(); +#endif php_set_compare_func(sort_type); @@ -1366,9 +1374,18 @@ PHP_FUNCTION(extract) int extract_refs = 0; zend_array *symbol_table; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|lz/", &var_array, &extract_type, &prefix) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 3) + Z_PARAM_ARRAY(var_array) + Z_PARAM_OPTIONAL + Z_PARAM_LONG(extract_type) + Z_PARAM_ZVAL_EX(prefix, 0, 1) + ZEND_PARSE_PARAMETERS_END(); +#endif extract_refs = (extract_type & EXTR_REFS); if (extract_refs) { diff --git a/ext/standard/math.c b/ext/standard/math.c index 6d18c0b..0704195 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -295,9 +295,16 @@ PHP_FUNCTION(abs) { zval *value; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_ZVAL(value) + ZEND_PARSE_PARAMETERS_END(); +#endif + convert_scalar_to_number_ex(value); if (Z_TYPE_P(value) == IS_DOUBLE) {

« previous php.cvs (#83853) next »