Fixed bug #50351 (performance regression handling objects, ten times slower in 5...
authorDmitry Stogov <dmitry@php.net>
Mon, 7 Dec 2009 08:14:48 +0000 (08:14 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 7 Dec 2009 08:14:48 +0000 (08:14 +0000)
NEWS
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

diff --git a/NEWS b/NEWS
index 89a0479ac0d3d9170efa38bab86d5cfc2c4b6e0f..bb22014ba0e3de838d72e35cbf5e7e08e1c652b9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,8 @@ PHP                                                                        NEWS
 - Fixed memory leak in extension loading when an error occurs on Windows.
   (Pierre)
 
+- Fixed bug #50351 (performance regression handling objects, ten times slower
+  in 5.3 than in 5.2). (Dmitry)
 - Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
   (Jani)
 - Fixed bug #50340 (php.ini parser does not allow spaces in ini keys). (Jani)
index 52f200e35d7daeceb2a92c7bb6f390bdc10fc5cf..8b574cb46be21cc661de64b17e024f78dc75635d 100644 (file)
@@ -3691,7 +3691,7 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
 {
        zend_op *opline = EX(opline);
        zend_free_op free_op1;
-       zval *array = GET_OP1_ZVAL_PTR(BP_VAR_R);
+       zval *array = EX_T(opline->op1.u.var).var.ptr;
        zval **value;
        char *str_key;
        uint str_key_len;
@@ -3701,8 +3701,6 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
        int key_type = 0;
        zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
 
-       PZVAL_LOCK(array);
-
        switch (zend_iterator_unwrap(array, &iter TSRMLS_CC)) {
                default:
                case ZEND_ITER_INVALID:
index 38bd50be16d243b932fb44076ac6ec836c3519df..74f144a4bb653755f9303a84442be7e2be1e9a1a 100644 (file)
@@ -8851,8 +8851,8 @@ static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
 static int ZEND_FASTCALL  ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 {
        zend_op *opline = EX(opline);
-       zend_free_op free_op1;
-       zval *array = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+
+       zval *array = EX_T(opline->op1.u.var).var.ptr;
        zval **value;
        char *str_key;
        uint str_key_len;
@@ -8862,8 +8862,6 @@ static int ZEND_FASTCALL  ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
        int key_type = 0;
        zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
 
-       PZVAL_LOCK(array);
-
        switch (zend_iterator_unwrap(array, &iter TSRMLS_CC)) {
                default:
                case ZEND_ITER_INVALID: