php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60139
Patch gc-closure2.diff revision 2011-10-31 11:04 UTC by dmitry@php.net
Patch gc-closure.diff revision 2011-10-31 11:04 UTC by dmitry@php.net
revision 2011-10-31 08:44 UTC by dmitry@php.net
Patch bug60139.php5.4.diff revision 2011-10-29 10:23 UTC by arnaud dot lb at gmail dot com
Patch test2.phpt revision 2011-10-28 14:24 UTC by arnaud dot lb at gmail dot com
Patch test1.phpt revision 2011-10-28 14:23 UTC by arnaud dot lb at gmail dot com

Patch gc-closure.diff for Performance problem Bug #60139

Patch version 2011-10-31 08:44 UTC

Return to Bug #60139 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2011-10-31 11:04 UTC | 2011-10-31 08:44 UTC

Developer: dmitry@php.net



  -					return;
  +				if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +					const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +					if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +					if (!func->op_array.static_variables) {
  +						return;
  +					}
  +					p = func->op_array.static_variables->pListHead;
  +				} else {


  -			return;
  +		if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +			const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +			if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +			if (!func->op_array.static_variables) {
  +				return;
  +			}
  +			p = func->op_array.static_variables->pListHead;
  +		} else {


  -						return;
  +					if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +						const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +						if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +						if (!func->op_array.static_variables) {
  +							return;
  +						}
  +						p = func->op_array.static_variables->pListHead;
  +					} else {


  -				return;
  +			if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +				const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +				if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +				if (!func->op_array.static_variables) {
  +					return;
  +				}
  +				p = func->op_array.static_variables->pListHead;
  +			} else {


  -								return 0;
  +							if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +								const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +								if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +								if (!func->op_array.static_variables) {
  +									return 0;
  +								}
  +								p = func->op_array.static_variables->pListHead;
  +							} else {


  -						return;
  +					if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +						const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +						if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +						if (!func->op_array.static_variables) {
  +							return;
  +						}
  +						p = func->op_array.static_variables->pListHead;
  +					} else {


  -						return;
  +					if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +						const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +						if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +						if (!func->op_array.static_variables) {
  +							return;
  +						}
  +						p = func->op_array.static_variables->pListHead;
  +					} else {


  -					return;
  +				if (Z_OBJCE_P(pz) == zend_ce_closure) {
  +					const zend_function *func = zend_get_closure_method_def(pz TSRMLS_CC);
  +
 +					if (func->type != ZEND_USER_FUNCTION || !func->op_array.static_variables) {
 +					if (!func->op_array.static_variables) {
  +						return;
  +					}
  +					p = func->op_array.static_variables->pListHead;
  +				} else {


  +							if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) {
  +								zval_scan_black(pz TSRMLS_CC);
  +							}
  +						}
 +						if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +						if (func->op_array.static_variables) {
  +							p = func->op_array.static_variables->pListHead;
  +						}
  +					} else if (!zobj->properties) {
   						int i;


  +					if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) {
  +						zval_scan_black(pz TSRMLS_CC);
  +					}
  +				}
 +				if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +				if (func->op_array.static_variables) {
  +					p = func->op_array.static_variables->pListHead;
  +				}
  +			} else if (!zobj->properties) {
   				int i;


  +							if (pz) {
  +								pz->refcount__gc--;
  +								zval_mark_grey(pz TSRMLS_CC);
  +							}
 +							if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +							if (func->op_array.static_variables) {
  +								p = func->op_array.static_variables->pListHead;
  +							}
  +						} else if (!zobj->properties) {
   							int i;


  +					if (pz) {
  +						pz->refcount__gc--;
  +						zval_mark_grey(pz TSRMLS_CC);
  +					}
 +					if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +					if (func->op_array.static_variables) {
  +						p = func->op_array.static_variables->pListHead;
  +					}
  +				} else if (!zobj->properties) {
   					int i;


  +									pz = zend_get_closure_this_ptr(pz TSRMLS_CC);
  +									if (pz) {
  +										zval_scan(pz TSRMLS_CC);
  +									}
 +									if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +									if (func->op_array.static_variables) {
  +										p = func->op_array.static_variables->pListHead;
  +									}
  +								} else if (!zobj->properties) {
   									int i;


  +							pz = zend_get_closure_this_ptr(pz TSRMLS_CC);
  +							if (pz) {
  +								zval_scan(pz TSRMLS_CC);
  +							}
 +							if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +							if (func->op_array.static_variables) {
  +								p = func->op_array.static_variables->pListHead;
  +							}
  +						} else if (!zobj->properties) {
   							int i;


  +							if (zv) {
  +								zv->refcount__gc++;
  +								zval_collect_white(zv TSRMLS_CC);
  +							}
 +							if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +							if (func->op_array.static_variables) {
  +								p = func->op_array.static_variables->pListHead;
  +							}
  +						} else if (!zobj->properties) {
   							int i;


  +						if (pz) {
  +							pz->refcount__gc++;
  +							zval_collect_white(pz TSRMLS_CC);
  +						}
 +						if (func->type == ZEND_USER_FUNCTION && func->op_array.static_variables) {
 +						if (func->op_array.static_variables) {
  +							p = func->op_array.static_variables->pListHead;
  +						}
  +					} else if (!zobj->properties) {
   						int i;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC