]> granicus.if.org Git - php/commitdiff
Eliminate unnecessary checks for INC/DEC IS_CV
authorDmitry Stogov <dmitry@php.net>
Mon, 21 Jan 2008 14:26:47 +0000 (14:26 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 21 Jan 2008 14:26:47 +0000 (14:26 +0000)
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index feb4d29b20451ae561b578d5af5d21ab465dde7d..de8537e83100b34e707af0bbeafb87a8138dc1ad 100644 (file)
@@ -724,7 +724,7 @@ ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY)
        zend_free_op free_op1;
        zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
 
-       if (!var_ptr) {
+       if (OP1_TYPE == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -765,7 +765,7 @@ ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY)
        zend_free_op free_op1;
        zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
 
-       if (!var_ptr) {
+       if (OP1_TYPE == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -806,7 +806,7 @@ ZEND_VM_HANDLER(36, ZEND_POST_INC, VAR|CV, ANY)
        zend_free_op free_op1;
        zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
 
-       if (!var_ptr) {
+       if (OP1_TYPE == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -844,7 +844,7 @@ ZEND_VM_HANDLER(37, ZEND_POST_DEC, VAR|CV, ANY)
        zend_free_op free_op1;
        zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
 
-       if (!var_ptr) {
+       if (OP1_TYPE == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
index 3aff8e54016ae75a66201c11a21bfc111c6e4062..4f0390044fd4b7adf27ddca00e691e2d944eeace 100644 (file)
@@ -7367,7 +7367,7 @@ static int ZEND_PRE_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
        zend_free_op free_op1;
        zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_VAR == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -7408,7 +7408,7 @@ static int ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
        zend_free_op free_op1;
        zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_VAR == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -7449,7 +7449,7 @@ static int ZEND_POST_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
        zend_free_op free_op1;
        zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_VAR == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -7487,7 +7487,7 @@ static int ZEND_POST_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
        zend_free_op free_op1;
        zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_VAR == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -21136,7 +21136,7 @@ static int ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 
        zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_CV == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -21176,7 +21176,7 @@ static int ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 
        zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_CV == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -21216,7 +21216,7 @@ static int ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 
        zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_CV == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {
@@ -21253,7 +21253,7 @@ static int ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 
        zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
 
-       if (!var_ptr) {
+       if (IS_CV == IS_VAR && !var_ptr) {
                zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
        }
        if (*var_ptr == EG(error_zval_ptr)) {