mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Use fast method to check if first arguments should be passed by reference (not tested onbig endian).
This commit is contained in:
parent
af33279a6c
commit
15a5f61cf4
11 changed files with 103 additions and 6 deletions
|
@ -3215,7 +3215,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER
|
|||
zval *value, *arg;
|
||||
|
||||
|
||||
if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
|
||||
if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
goto send_val_by_ref;
|
||||
}
|
||||
} else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
send_val_by_ref:
|
||||
SAVE_OPLINE();
|
||||
zend_error(E_EXCEPTION | E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
|
||||
|
||||
|
@ -11466,7 +11471,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER(Z
|
|||
zval *value, *arg;
|
||||
zend_free_op free_op1;
|
||||
|
||||
if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
|
||||
if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
goto send_val_by_ref;
|
||||
}
|
||||
} else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
send_val_by_ref:
|
||||
SAVE_OPLINE();
|
||||
zend_error(E_EXCEPTION | E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
|
||||
|
@ -14703,7 +14713,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER(Z
|
|||
zval *varptr, *arg;
|
||||
zend_free_op free_op1;
|
||||
|
||||
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
|
||||
if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
goto send_var_by_ref;
|
||||
}
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
send_var_by_ref:
|
||||
return ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
|
||||
|
@ -28441,7 +28456,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_CV_HANDLER(ZE
|
|||
zval *varptr, *arg;
|
||||
|
||||
|
||||
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
|
||||
if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
goto send_var_by_ref;
|
||||
}
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
send_var_by_ref:
|
||||
return ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue