Patch bug55493.patch for Variables related Bug #55493
Patch version 2011-08-24 12:48 UTC
Return to Bug #55493 |
Download this patch
Patch Revisions:
Developer: laruence@php.net
Index: trunk/Zend/zend_execute.c
===================================================================
--- trunk/Zend/zend_execute.c (revision 315413)
+++ trunk/Zend/zend_execute.c (working copy)
@@ -66,6 +66,17 @@
#define TEMP_VAR_STACK_LIMIT 2000
+static zend_always_inline void zend_decide_fetch_type(zend_op *opline, zval *varname, ulong hash_value TSRMLS_DC) {
+ if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_PENDING) {
+ /* see bug #55493 for more details */
+ if (zend_is_auto_global_quick(Z_STRVAL_P(varname), Z_STRLEN_P(varname), hash_value TSRMLS_CC)) {
+ opline->extended_value = (opline->extended_value & ~ZEND_FETCH_TYPE_MASK) | ZEND_FETCH_GLOBAL;
+ } else {
+ opline->extended_value = (opline->extended_value & ~ZEND_FETCH_TYPE_MASK) | ZEND_FETCH_LOCAL;
+ }
+ }
+}
+
static zend_always_inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free, int unref TSRMLS_DC)
{
if (!Z_DELREF_P(z)) {
Index: trunk/Zend/zend_compile.c
===================================================================
--- trunk/Zend/zend_compile.c (revision 315413)
+++ trunk/Zend/zend_compile.c (working copy)
@@ -704,6 +704,8 @@
if (zend_is_auto_global_quick(varname->u.constant.value.str.val, varname->u.constant.value.str.len, Z_HASH_P(&CONSTANT(opline_ptr->op1.constant)) TSRMLS_CC)) {
opline_ptr->extended_value = ZEND_FETCH_GLOBAL;
}
+ } else {
+ opline_ptr->extended_value = ZEND_FETCH_PENDING;
}
if (bp) {
Index: trunk/Zend/zend_compile.h
===================================================================
--- trunk/Zend/zend_compile.h (revision 315413)
+++ trunk/Zend/zend_compile.h (working copy)
@@ -759,6 +759,7 @@
#define ZEND_FETCH_STATIC_MEMBER 0x30000000
#define ZEND_FETCH_GLOBAL_LOCK 0x40000000
#define ZEND_FETCH_LEXICAL 0x50000000
+#define ZEND_FETCH_PENDING 0x60000000
#define ZEND_FETCH_TYPE_MASK 0x70000000
Index: trunk/Zend/zend_vm_def.h
===================================================================
--- trunk/Zend/zend_vm_def.h (revision 315413)
+++ trunk/Zend/zend_vm_def.h (working copy)
@@ -1047,13 +1047,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((OP1_TYPE == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
FREE_OP1();
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (OP1_TYPE == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -1061,7 +1055,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -3883,7 +3886,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((OP1_TYPE == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(EXECUTE_DATA, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -4374,6 +4377,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (OP1_TYPE == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
Index: trunk/Zend/zend_vm_execute.h
===================================================================
--- trunk/Zend/zend_vm_execute.h (revision 315413)
+++ trunk/Zend/zend_vm_execute.h (working copy)
@@ -3180,13 +3180,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_CONST == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -3194,7 +3188,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -3694,7 +3697,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -3760,6 +3763,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_CONST == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -4651,13 +4664,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_CONST == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -4665,7 +4672,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -5051,7 +5067,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -5117,6 +5133,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_CONST == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -5185,13 +5211,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_CONST == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -5199,7 +5219,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -5567,7 +5596,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -5633,6 +5662,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_CONST == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -7498,13 +7537,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
zval_dtor(free_op1.var);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_TMP_VAR == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -7512,7 +7545,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -7923,7 +7965,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -7989,6 +8031,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_TMP_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -8842,13 +8894,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
zval_dtor(free_op1.var);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_TMP_VAR == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -8856,7 +8902,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -9244,7 +9299,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -9310,6 +9365,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_TMP_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -9378,13 +9443,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
zval_dtor(free_op1.var);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_TMP_VAR == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -9392,7 +9451,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -9647,7 +9715,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -9713,6 +9781,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_TMP_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -12367,13 +12445,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_VAR == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -12381,7 +12453,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -13504,7 +13585,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -13710,6 +13791,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -16570,13 +16661,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_VAR == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -16584,7 +16669,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -17674,7 +17768,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -17880,6 +17974,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -18351,13 +18455,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_VAR == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -18365,7 +18463,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -18899,7 +19006,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -18965,6 +19072,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -27953,13 +28070,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_CV == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -27967,7 +28078,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -28878,7 +28998,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -29082,6 +29202,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_CV == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -31813,13 +31943,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_CV == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -31827,7 +31951,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -32795,7 +32928,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -32999,6 +33132,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_CV == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
@@ -33467,13 +33610,7 @@
retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-*/
+ ulong hash_value;
if (IS_CV == IS_CONST) {
hash_value = Z_HASH_P(varname);
} else if (IS_INTERNED(Z_STRVAL_P(varname))) {
@@ -33481,7 +33618,16 @@
} else {
hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
}
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+
if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
@@ -33901,7 +34047,7 @@
zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
@@ -33967,6 +34113,16 @@
isset = 0;
}
} else {
+ ulong hash_value;
+ if (IS_CV == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+ zend_decide_fetch_type(opline, varname, hash_value TSRMLS_CC);
+
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
|