From: Dmitry Stogov Date: Tue, 1 Apr 2014 07:44:11 +0000 (+0400) Subject: Fixed support for arg_info and type hinfing (TODO: names should be interned) X-Git-Tag: POST_PHPNG_MERGE~412^2~194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ceecd31cb6d96cef0d8b924fb2f03932b53cf7e3;p=php Fixed support for arg_info and type hinfing (TODO: names should be interned) --- diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 64833d0cfa..5562f8c55d 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -354,13 +354,11 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc for (i = 0; i < op_array->num_args; i++) { if (op_array->arg_info[i].name) { //??? zend_accel_store_interned_string(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1); - efree((char*)op_array->arg_info[i].name); - op_array->arg_info[i].name = NULL; + zend_accel_store(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1); } if (op_array->arg_info[i].class_name) { //??? zend_accel_store_interned_string(op_array->arg_info[i].class_name, op_array->arg_info[i].class_name_len + 1); - efree((char*)op_array->arg_info[i].class_name); - op_array->arg_info[i].class_name = NULL; + zend_accel_store(op_array->arg_info[i].class_name, op_array->arg_info[i].class_name_len + 1); } } } diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 089b09b4ad..5bd358df5c 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -209,9 +209,11 @@ static uint zend_persist_op_array_calc_ex(zend_op_array *op_array TSRMLS_DC) for (i = 0; i < op_array->num_args; i++) { if (op_array->arg_info[i].name) { //??? ADD_INTERNED_STRING(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1); + ADD_SIZE(op_array->arg_info[i].name_len + 1); } if (op_array->arg_info[i].class_name) { //??? ADD_INTERNED_STRING(op_array->arg_info[i].class_name, op_array->arg_info[i].class_name_len + 1); + ADD_SIZE(op_array->arg_info[i].class_name_len + 1); } }