cvs: ZendEngine2(PHP_5_3) / zend_compile.c zend_compile.h zend_vm_def.h zend_vm_execute.h
| From: | Dmitry Stogov | Date: | Mon, 12 May 2008 09:09:09 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_3) / zend_compile.c zend_compile.h zend_vm_def.h zend_vm_execute.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-6717@lists.php.net to get a copy of this message | ||
dmitry Mon May 12 09:09:09 2008 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_compile.c zend_compile.h zend_vm_def.h
zend_vm_execute.h
Log:
Fixed bug #44952 (isset() does not checks correctly variable variable)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.63&r2=1.647.2.27.2.41.2.64&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.63 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.64 --- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.63 Wed May 7 12:04:37 2008 +++ ZendEngine2/zend_compile.c Mon May 12 09:09:05 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.63 2008/05/07 12:04:37 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.64 2008/05/12 09:09:05 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -4187,6 +4187,7 @@ SET_UNUSED(opline->op2); opline->op2.u.EA.type = ZEND_FETCH_LOCAL; SET_UNUSED(opline->result); + opline->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4221,6 +4222,7 @@ SET_UNUSED(last_op->op2); last_op->op2.u.EA.type = ZEND_FETCH_LOCAL; last_op->result.u.var = get_temporary_variable(CG(active_op_array)); + last_op->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4235,9 +4237,10 @@ last_op->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; break; } + last_op->extended_value = 0; } last_op->result.op_type = IS_TMP_VAR; - last_op->extended_value = type; + last_op->extended_value |= type; *result = last_op->result; } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.316.2.8.2.12.2.23&r2=1.316.2.8.2.12.2.24&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.23 ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.24 --- ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.23 Wed May 7 12:04:37 2008 +++ ZendEngine2/zend_compile.h Mon May 12 09:09:05 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.23 2008/05/07 12:04:37 dmitry Exp $ */ +/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.24 2008/05/12 09:09:05 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -664,6 +664,8 @@ #define ZEND_ISSET (1<<0) #define ZEND_ISEMPTY (1<<1) +#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY) +#define ZEND_QUICK_SET (1<<2) #define ZEND_CT (1<<0) #define ZEND_RT (1<<1) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.48.2.54&r2=1.59.2.29.2.48.2.55&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.54 ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.55 --- ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.54 Wed May 7 12:04:37 2008 +++ ZendEngine2/zend_vm_def.h Mon May 12 09:09:05 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.54 2008/05/07 12:04:37 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.55 2008/05/12 09:09:05 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -3159,7 +3159,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -3196,7 +3196,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { Z_ADDREF_P(varname); } @@ -3229,7 +3229,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { zval_ptr_dtor(&varname); } FREE_OP1(); @@ -3666,7 +3666,7 @@ zval **value; zend_bool isset = 1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -3710,7 +3710,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.49.2.54&r2=1.62.2.30.2.49.2.55&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.54 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.55 --- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.54 Wed May 7 12:04:38 2008 +++ ZendEngine2/zend_vm_execute.h Mon May 12 09:09:05 2008 @@ -1788,7 +1788,7 @@ HashTable *target_symbol_table; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -1825,7 +1825,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { Z_ADDREF_P(varname); } @@ -1858,7 +1858,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { zval_ptr_dtor(&varname); } @@ -2023,7 +2023,7 @@ zval **value; zend_bool isset = 1; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -2067,7 +2067,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -5001,7 +5001,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -5038,7 +5038,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -5071,7 +5071,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { zval_ptr_dtor(&varname); } zval_dtor(free_op1.var); @@ -5236,7 +5236,7 @@ zval **value; zend_bool isset = 1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -5280,7 +5280,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -8252,7 +8252,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -8289,7 +8289,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -8322,7 +8322,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { zval_ptr_dtor(&varname); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -8633,7 +8633,7 @@ zval **value; zend_bool isset = 1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -8677,7 +8677,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -21967,7 +21967,7 @@ HashTable *target_symbol_table; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -22004,7 +22004,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { Z_ADDREF_P(varname); } @@ -22037,7 +22037,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { zval_ptr_dtor(&varname); } @@ -22202,7 +22202,7 @@ zval **value; zend_bool isset = 1; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -22246,7 +22246,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.63&r2=1.647.2.27.2.41.2.64&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.63 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.64 --- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.63 Wed May 7 12:04:37 2008 +++ ZendEngine2/zend_compile.c Mon May 12 09:09:05 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.63 2008/05/07 12:04:37 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.64 2008/05/12 09:09:05 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -4187,6 +4187,7 @@ SET_UNUSED(opline->op2); opline->op2.u.EA.type = ZEND_FETCH_LOCAL; SET_UNUSED(opline->result); + opline->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4221,6 +4222,7 @@ SET_UNUSED(last_op->op2); last_op->op2.u.EA.type = ZEND_FETCH_LOCAL; last_op->result.u.var = get_temporary_variable(CG(active_op_array)); + last_op->extended_value = ZEND_QUICK_SET; } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; @@ -4235,9 +4237,10 @@ last_op->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; break; } + last_op->extended_value = 0; } last_op->result.op_type = IS_TMP_VAR; - last_op->extended_value = type; + last_op->extended_value |= type; *result = last_op->result; } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.316.2.8.2.12.2.23&r2=1.316.2.8.2.12.2.24&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.23 ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.24 --- ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.23 Wed May 7 12:04:37 2008 +++ ZendEngine2/zend_compile.h Mon May 12 09:09:05 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.23 2008/05/07 12:04:37 dmitry Exp $ */ +/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.24 2008/05/12 09:09:05 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -664,6 +664,8 @@ #define ZEND_ISSET (1<<0) #define ZEND_ISEMPTY (1<<1) +#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY) +#define ZEND_QUICK_SET (1<<2) #define ZEND_CT (1<<0) #define ZEND_RT (1<<1) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.48.2.54&r2=1.59.2.29.2.48.2.55&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.54 ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.55 --- ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.54 Wed May 7 12:04:37 2008 +++ ZendEngine2/zend_vm_def.h Mon May 12 09:09:05 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.54 2008/05/07 12:04:37 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.55 2008/05/12 09:09:05 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -3159,7 +3159,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -3196,7 +3196,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { Z_ADDREF_P(varname); } @@ -3229,7 +3229,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (OP1_TYPE == IS_VAR) { + } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { zval_ptr_dtor(&varname); } FREE_OP1(); @@ -3666,7 +3666,7 @@ zval **value; zend_bool isset = 1; - if (OP1_TYPE == IS_CV) { + if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -3710,7 +3710,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.49.2.54&r2=1.62.2.30.2.49.2.55&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.54 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.55 --- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.54 Wed May 7 12:04:38 2008 +++ ZendEngine2/zend_vm_execute.h Mon May 12 09:09:05 2008 @@ -1788,7 +1788,7 @@ HashTable *target_symbol_table; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -1825,7 +1825,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { Z_ADDREF_P(varname); } @@ -1858,7 +1858,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CONST == IS_VAR) { + } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { zval_ptr_dtor(&varname); } @@ -2023,7 +2023,7 @@ zval **value; zend_bool isset = 1; - if (IS_CONST == IS_CV) { + if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -2067,7 +2067,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -5001,7 +5001,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -5038,7 +5038,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -5071,7 +5071,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_TMP_VAR == IS_VAR) { + } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { zval_ptr_dtor(&varname); } zval_dtor(free_op1.var); @@ -5236,7 +5236,7 @@ zval **value; zend_bool isset = 1; - if (IS_TMP_VAR == IS_CV) { + if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -5280,7 +5280,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -8252,7 +8252,7 @@ HashTable *target_symbol_table; zend_free_op free_op1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -8289,7 +8289,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { Z_ADDREF_P(varname); } @@ -8322,7 +8322,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_VAR == IS_VAR) { + } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { zval_ptr_dtor(&varname); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -8633,7 +8633,7 @@ zval **value; zend_bool isset = 1; - if (IS_VAR == IS_CV) { + if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -8677,7 +8677,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; @@ -21967,7 +21967,7 @@ HashTable *target_symbol_table; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); @@ -22004,7 +22004,7 @@ zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { Z_ADDREF_P(varname); } @@ -22037,7 +22037,7 @@ if (varname == &tmp) { zval_dtor(&tmp); - } else if (IS_CV == IS_VAR) { + } else if (IS_CV == IS_VAR || IS_CV == IS_CV) { zval_ptr_dtor(&varname); } @@ -22202,7 +22202,7 @@ zval **value; zend_bool isset = 1; - if (IS_CV == IS_CV) { + if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { @@ -22246,7 +22246,7 @@ Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; - switch (opline->extended_value) { + switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;