/* Set the new yielded key */
if (IS_CONST != IS_UNUSED) {
zval *key = RT_CONSTANT(opline, opline->op2);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CONST == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CONST == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_TMP_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_TMP_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_TMP_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_TMP_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_UNUSED != IS_UNUSED) {
zval *key = NULL;
-
- /* Consts, temporary variables and references need copying */
- if (IS_UNUSED == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_UNUSED == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_UNUSED == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CV != IS_UNUSED) {
zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CV == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CV == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CONST != IS_UNUSED) {
zval *key = RT_CONSTANT(opline, opline->op2);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CONST == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CONST == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_TMP_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_TMP_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_TMP_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_TMP_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_UNUSED != IS_UNUSED) {
zval *key = NULL;
-
- /* Consts, temporary variables and references need copying */
- if (IS_UNUSED == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_UNUSED == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_UNUSED == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CV != IS_UNUSED) {
zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CV == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CV == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CONST != IS_UNUSED) {
zval *key = RT_CONSTANT(opline, opline->op2);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CONST == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CONST == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_TMP_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_TMP_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_TMP_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_TMP_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_UNUSED != IS_UNUSED) {
zval *key = NULL;
-
- /* Consts, temporary variables and references need copying */
- if (IS_UNUSED == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_UNUSED == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_UNUSED == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CV != IS_UNUSED) {
zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CV == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CV == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CONST != IS_UNUSED) {
zval *key = RT_CONSTANT(opline, opline->op2);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CONST == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CONST == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_TMP_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_TMP_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_TMP_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_TMP_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_UNUSED != IS_UNUSED) {
zval *key = NULL;
-
- /* Consts, temporary variables and references need copying */
- if (IS_UNUSED == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_UNUSED == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_UNUSED == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CV != IS_UNUSED) {
zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CV == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CV == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CONST != IS_UNUSED) {
zval *key = RT_CONSTANT(opline, opline->op2);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CONST == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CONST == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CONST & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_TMP_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_TMP_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_TMP_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_TMP_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_VAR != IS_UNUSED) {
zval *key = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_VAR == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_VAR & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_UNUSED != IS_UNUSED) {
zval *key = NULL;
-
- /* Consts, temporary variables and references need copying */
- if (IS_UNUSED == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_UNUSED == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_UNUSED == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_UNUSED & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key
/* Set the new yielded key */
if (IS_CV != IS_UNUSED) {
zval *key = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
-
- /* Consts, temporary variables and references need copying */
- if (IS_CV == IS_CONST) {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
- Z_ADDREF(generator->key);
- }
- } else if (IS_CV == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(&generator->key, key);
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
- ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
-
- } else {
- ZVAL_COPY_VALUE(&generator->key, key);
- if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
- }
+ if ((IS_CV & (IS_CV|IS_VAR)) && UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE) {
+ key = Z_REFVAL_P(key);
}
+ ZVAL_COPY(&generator->key, key);
if (Z_TYPE(generator->key) == IS_LONG
&& Z_LVAL(generator->key) > generator->largest_used_integer_key