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

index 4abd805877a2ecbed9becdee4bd2a4f7250202d7..61ee28e6d43a2b93085ff50352dfe644164de4bf 100644 (file)
@@ -725,7 +725,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)) {
@@ -766,7 +766,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)) {
@@ -807,7 +807,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)) {
@@ -845,7 +845,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 e4c6e5c79baf32681661c5ec3d1a88148d9457ee..146dda675f90a3c5b0d0725a17c0fb5a123f9049 100644 (file)
@@ -7160,7 +7160,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)) {
@@ -7201,7 +7201,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)) {
@@ -7242,7 +7242,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)) {
@@ -7280,7 +7280,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)) {
@@ -20365,7 +20365,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)) {
@@ -20405,7 +20405,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)) {
@@ -20445,7 +20445,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)) {
@@ -20482,7 +20482,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)) {