com php-src: simplification: Zend/zend_vm_def.h Zend/ze nd_vm_execute.h

From: Date: Mon, 06 Jun 2016 12:50:06 +0000
Subject: com php-src: simplification: Zend/zend_vm_def.h Zend/ze nd_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92328@lists.php.net to get a copy of this message
Commit: 58c083dfc9b83803d11e8f5f1cc0c91bf4f0ca37 Author: Dmitry Stogov <dmitry@zend.com> Mon, 6 Jun 2016 15:50:06 +0300 Parents: 80b39b498af35f8c7dfebac1f1223e72fcdb1f78 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=58c083dfc9b83803d11e8f5f1cc0c91bf4f0ca37 Log: simplification Changed paths: M Zend/zend_vm_def.h M Zend/zend_vm_execute.h Diff: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 3801575..09afc7c 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4300,20 +4300,15 @@ ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR, NUM) zval *varptr, *arg; varptr = GET_OP1_ZVAL_PTR(BP_VAR_R); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } SAVE_OPLINE(); zend_error(E_NOTICE, "Only variables should be passed by reference"); - - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -4330,12 +4325,11 @@ ZEND_VM_HANDLER(50, ZEND_SEND_VAR_NO_REF_EX, VAR, NUM, SPEC(QUICK_ARG)) } varptr = GET_OP1_ZVAL_PTR(BP_VAR_R); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr) || QUICK_ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } } else { @@ -4344,22 +4338,17 @@ ZEND_VM_HANDLER(50, ZEND_SEND_VAR_NO_REF_EX, VAR, NUM, SPEC(QUICK_ARG)) } varptr = GET_OP1_ZVAL_PTR(BP_VAR_R); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr) || ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } } SAVE_OPLINE(); zend_error(E_NOTICE, "Only variables should be passed by reference"); - - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 03c64fa..86543f5 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -15601,20 +15601,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDL zval *varptr, *arg; varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } SAVE_OPLINE(); zend_error(E_NOTICE, "Only variables should be passed by reference"); - - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -15631,12 +15626,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_HA } varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr) || QUICK_ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } } else { @@ -15645,22 +15639,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_HA } varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr) || ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } } SAVE_OPLINE(); zend_error(E_NOTICE, "Only variables should be passed by reference"); - - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -15677,12 +15666,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_QU } varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr) || QUICK_ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } } else { @@ -15691,22 +15679,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_QU } varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1); + arg = ZEND_CALL_VAR(EX(call), opline->result.var); + ZVAL_COPY_VALUE(arg, varptr); if (EXPECTED(Z_ISREF_P(varptr) || ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) { - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE(); } } SAVE_OPLINE(); zend_error(E_NOTICE, "Only variables should be passed by reference"); - - arg = ZEND_CALL_VAR(EX(call), opline->result.var); - ZVAL_COPY_VALUE(arg, varptr); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); }

« previous php.cvs (#92328) next »