diff options
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r-- | Zend/zend_vm_execute.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 523e0985f9..20c0e67263 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -20366,10 +20366,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_LEXICAL_SPEC_TMP_CV_HANDL USE_OPLINE zend_free_op free_op1; zval *closure, *var; - zend_string *var_name; closure = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC); - if (opline->extended_value) { + if (opline->extended_value & ZEND_BIND_REF) { /* By-ref binding */ var = _get_zval_ptr_cv_BP_VAR_W(opline->op2.var EXECUTE_DATA_CC); if (Z_ISREF_P(var)) { @@ -20390,8 +20389,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_LEXICAL_SPEC_TMP_CV_HANDL Z_TRY_ADDREF_P(var); } - var_name = CV_DEF_OF(EX_VAR_TO_NUM(opline->op2.var)); - zend_closure_bind_var(closure, var_name, var); + zend_closure_bind_var_ex(closure, (opline->extended_value & ~ZEND_BIND_REF), var); ZEND_VM_NEXT_OPCODE(); } @@ -42028,9 +42026,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_STATIC_SPEC_CV_CONST_HAND } varname = RT_CONSTANT(opline, opline->op2); - value = zend_hash_find_ex(ht, Z_STR_P(varname), 1); + value = (zval*)((char*)ht->arData + (opline->extended_value & ~ZEND_BIND_REF)); - if (opline->extended_value) { + if (opline->extended_value & ZEND_BIND_REF) { if (Z_TYPE_P(value) == IS_CONSTANT_AST) { SAVE_OPLINE(); if (UNEXPECTED(zval_update_constant_ex(value, EX(func)->op_array.scope) != SUCCESS)) { |