}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- retval = zend_hash_find(target_symbol_table, name);
+ retval = zend_hash_find_ex(target_symbol_table, name, OP1_TYPE == IS_CONST);
if (retval == NULL) {
if (UNEXPECTED(zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_THIS)))) {
zval *result;
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
ZEND_VM_C_GOTO(fast_assign_obj);
}
function_name = (zval*)RT_CONSTANT(opline, opline->op2);
fbc = CACHED_PTR(Z_CACHE_SLOT_P(function_name));
if (UNEXPECTED(fbc == NULL)) {
- func = zend_hash_find(EG(function_table), Z_STR_P(function_name+1));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(function_name+1), 1);
if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(function_name));
func_name = RT_CONSTANT(opline, opline->op2) + 1;
fbc = CACHED_PTR(Z_CACHE_SLOT_P(RT_CONSTANT(opline, opline->op2)));
if (UNEXPECTED(fbc == NULL)) {
- func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
if (func == NULL) {
func_name++;
- func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
if (UNEXPECTED(fbc == NULL)) {
- func = zend_hash_find(EG(function_table), Z_STR_P(fname));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(fname), 1);
if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(fname));
{
zend_class_entry *ce, *scope;
zend_class_constant *c;
- zval *value;
+ zval *value, *zv;
USE_OPLINE
SAVE_OPLINE();
}
}
- if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)))) != NULL)) {
+ zv = zend_hash_find_ex(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)), 1);
+ if (EXPECTED(zv != NULL)) {
+ c = Z_PTR_P(zv);
scope = EX(func)->op_array.scope;
if (!zend_verify_const_access(c, scope)) {
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- value = zend_hash_find_ind(target_symbol_table, name);
+ value = zend_hash_find_ex_ind(target_symbol_table, name, OP1_TYPE == IS_CONST);
if (OP1_TYPE != IS_CONST) {
zend_tmp_string_release(tmp_name);
}
}
ZEND_VM_C_LABEL(str_index_prop):
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, OP2_TYPE == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
ZEND_VM_C_LABEL(num_index_prop):
do {
EG(error_reporting) = 0;
if (!EG(error_reporting_ini_entry)) {
- zend_ini_entry *p = zend_hash_find_ptr(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING));
- if (p) {
- EG(error_reporting_ini_entry) = p;
+ zval *zv = zend_hash_find_ex(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING), 1);
+ if (zv) {
+ EG(error_reporting_ini_entry) = (zend_ini_entry *)Z_PTR_P(zv);
} else {
break;
}
zval *zce, *orig_zce;
SAVE_OPLINE();
- if ((zce = zend_hash_find(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)))) == NULL ||
- ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1))) != NULL &&
+ if ((zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1)) == NULL ||
+ ((orig_zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1), 1)) != NULL &&
Z_CE_P(zce) != Z_CE_P(orig_zce))) {
do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->op2.var)), 0);
}
ZEND_VM_HANDLER(171, ZEND_DECLARE_ANON_CLASS, ANY, ANY, JMP_ADDR)
{
+ zval *zv;
zend_class_entry *ce;
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)));
+ zv = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
+ ZEND_ASSERT(zv != NULL);
+ ce = Z_CE_P(zv);
Z_CE_P(EX_VAR(opline->result.var)) = ce;
- ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
ZEND_VM_HANDLER(172, ZEND_DECLARE_ANON_INHERITED_CLASS, ANY, VAR, JMP_ADDR)
{
+ zval *zv;
zend_class_entry *ce;
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)));
+ zv = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
+ ZEND_ASSERT(zv != NULL);
+ ce = Z_CE_P(zv);
Z_CE_P(EX_VAR(opline->result.var)) = ce;
- ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
zval *object;
zend_class_entry *called_scope;
- zfunc = zend_hash_find(EG(function_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)));
+ zfunc = zend_hash_find_ex(EG(function_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
ZEND_ASSERT(zfunc != NULL && Z_FUNC_P(zfunc)->type == ZEND_USER_FUNCTION);
if (Z_TYPE(EX(This)) == IS_OBJECT) {
}
}
- value = zend_hash_find(&EG(symbol_table), Z_STR_P(varname));
+ value = zend_hash_find_ex(&EG(symbol_table), Z_STR_P(varname), 1);
if (UNEXPECTED(value == NULL)) {
value = zend_hash_add_new(&EG(symbol_table), Z_STR_P(varname), &EG(uninitialized_zval));
idx = (char*)value - (char*)EG(symbol_table).arData;
}
varname = GET_OP2_ZVAL_PTR(BP_VAR_R);
- value = zend_hash_find(ht, Z_STR_P(varname));
+ value = zend_hash_find_ex(ht, Z_STR_P(varname), 1);
if (opline->extended_value) {
if (Z_TYPE_P(value) == IS_CONSTANT_AST) {
jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R));
if (Z_TYPE_P(op) != IS_STRING) {
- ZVAL_DEREF(op);
- if (Z_TYPE_P(op) != IS_STRING) {
+ if (OP1_TYPE == IS_CONST) {
/* Wrong type, fall back to ZEND_CASE chain */
ZEND_VM_NEXT_OPCODE();
+ } else {
+ ZVAL_DEREF(op);
+ if (Z_TYPE_P(op) != IS_STRING) {
+ /* Wrong type, fall back to ZEND_CASE chain */
+ ZEND_VM_NEXT_OPCODE();
+ }
}
}
- jump_zv = zend_hash_find(jumptable, Z_STR_P(op));
+ jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), OP1_TYPE == IS_CONST);
if (jump_zv != NULL) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv));
ZEND_VM_CONTINUE();
do {
EG(error_reporting) = 0;
if (!EG(error_reporting_ini_entry)) {
- zend_ini_entry *p = zend_hash_find_ptr(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING));
- if (p) {
- EG(error_reporting_ini_entry) = p;
+ zval *zv = zend_hash_find_ex(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING), 1);
+ if (zv) {
+ EG(error_reporting_ini_entry) = (zend_ini_entry *)Z_PTR_P(zv);
} else {
break;
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ zval *zv;
zend_class_entry *ce;
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)));
+ zv = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
+ ZEND_ASSERT(zv != NULL);
+ ce = Z_CE_P(zv);
Z_CE_P(EX_VAR(opline->result.var)) = ce;
- ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
function_name = (zval*)RT_CONSTANT(opline, opline->op2);
fbc = CACHED_PTR(Z_CACHE_SLOT_P(function_name));
if (UNEXPECTED(fbc == NULL)) {
- func = zend_hash_find(EG(function_table), Z_STR_P(function_name+1));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(function_name+1), 1);
if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(function_name));
func_name = RT_CONSTANT(opline, opline->op2) + 1;
fbc = CACHED_PTR(Z_CACHE_SLOT_P(RT_CONSTANT(opline, opline->op2)));
if (UNEXPECTED(fbc == NULL)) {
- func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
if (func == NULL) {
func_name++;
- func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
if (UNEXPECTED(fbc == NULL)) {
- func = zend_hash_find(EG(function_table), Z_STR_P(fname));
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(fname), 1);
if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(fname));
zval *zce, *orig_zce;
SAVE_OPLINE();
- if ((zce = zend_hash_find(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)))) == NULL ||
- ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1))) != NULL &&
+ if ((zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1)) == NULL ||
+ ((orig_zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1), 1)) != NULL &&
Z_CE_P(zce) != Z_CE_P(orig_zce))) {
do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->op2.var)), 0);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ zval *zv;
zend_class_entry *ce;
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)));
+ zv = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
+ ZEND_ASSERT(zv != NULL);
+ ce = Z_CE_P(zv);
Z_CE_P(EX_VAR(opline->result.var)) = ce;
- ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
{
zend_class_entry *ce, *scope;
zend_class_constant *c;
- zval *value;
+ zval *value, *zv;
USE_OPLINE
SAVE_OPLINE();
}
}
- if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)))) != NULL)) {
+ zv = zend_hash_find_ex(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)), 1);
+ if (EXPECTED(zv != NULL)) {
+ c = Z_PTR_P(zv);
scope = EX(func)->op_array.scope;
if (!zend_verify_const_access(c, scope)) {
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, IS_CONST == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2));
if (Z_TYPE_P(op) != IS_STRING) {
- ZVAL_DEREF(op);
- if (Z_TYPE_P(op) != IS_STRING) {
+ if (IS_CONST == IS_CONST) {
/* Wrong type, fall back to ZEND_CASE chain */
ZEND_VM_NEXT_OPCODE();
+ } else {
+ ZVAL_DEREF(op);
+ if (Z_TYPE_P(op) != IS_STRING) {
+ /* Wrong type, fall back to ZEND_CASE chain */
+ ZEND_VM_NEXT_OPCODE();
+ }
}
}
- jump_zv = zend_hash_find(jumptable, Z_STR_P(op));
+ jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), IS_CONST == IS_CONST);
if (jump_zv != NULL) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv));
ZEND_VM_CONTINUE();
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- retval = zend_hash_find(target_symbol_table, name);
+ retval = zend_hash_find_ex(target_symbol_table, name, IS_CONST == IS_CONST);
if (retval == NULL) {
if (UNEXPECTED(zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_THIS)))) {
zval *result;
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- value = zend_hash_find_ind(target_symbol_table, name);
+ value = zend_hash_find_ex_ind(target_symbol_table, name, IS_CONST == IS_CONST);
if (IS_CONST != IS_CONST) {
zend_tmp_string_release(tmp_name);
zval *object;
zend_class_entry *called_scope;
- zfunc = zend_hash_find(EG(function_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)));
+ zfunc = zend_hash_find_ex(EG(function_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
ZEND_ASSERT(zfunc != NULL && Z_FUNC_P(zfunc)->type == ZEND_USER_FUNCTION);
if (Z_TYPE(EX(This)) == IS_OBJECT) {
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, IS_CV == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, (IS_TMP_VAR|IS_VAR) == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
{
zend_class_entry *ce, *scope;
zend_class_constant *c;
- zval *value;
+ zval *value, *zv;
USE_OPLINE
SAVE_OPLINE();
}
}
- if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)))) != NULL)) {
+ zv = zend_hash_find_ex(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)), 1);
+ if (EXPECTED(zv != NULL)) {
+ c = Z_PTR_P(zv);
scope = EX(func)->op_array.scope;
if (!zend_verify_const_access(c, scope)) {
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
{
zend_class_entry *ce, *scope;
zend_class_constant *c;
- zval *value;
+ zval *value, *zv;
USE_OPLINE
SAVE_OPLINE();
}
}
- if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)))) != NULL)) {
+ zv = zend_hash_find_ex(&ce->constants_table, Z_STR_P(RT_CONSTANT(opline, opline->op2)), 1);
+ if (EXPECTED(zv != NULL)) {
+ c = Z_PTR_P(zv);
scope = EX(func)->op_array.scope;
if (!zend_verify_const_access(c, scope)) {
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, IS_CONST == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
}
}
- value = zend_hash_find(&EG(symbol_table), Z_STR_P(varname));
+ value = zend_hash_find_ex(&EG(symbol_table), Z_STR_P(varname), 1);
if (UNEXPECTED(value == NULL)) {
value = zend_hash_add_new(&EG(symbol_table), Z_STR_P(varname), &EG(uninitialized_zval));
idx = (char*)value - (char*)EG(symbol_table).arData;
}
varname = RT_CONSTANT(opline, opline->op2);
- value = zend_hash_find(ht, Z_STR_P(varname));
+ value = zend_hash_find_ex(ht, Z_STR_P(varname), 1);
if (opline->extended_value) {
if (Z_TYPE_P(value) == IS_CONSTANT_AST) {
jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2));
if (Z_TYPE_P(op) != IS_STRING) {
- ZVAL_DEREF(op);
- if (Z_TYPE_P(op) != IS_STRING) {
+ if (IS_CV == IS_CONST) {
/* Wrong type, fall back to ZEND_CASE chain */
ZEND_VM_NEXT_OPCODE();
+ } else {
+ ZVAL_DEREF(op);
+ if (Z_TYPE_P(op) != IS_STRING) {
+ /* Wrong type, fall back to ZEND_CASE chain */
+ ZEND_VM_NEXT_OPCODE();
+ }
}
}
- jump_zv = zend_hash_find(jumptable, Z_STR_P(op));
+ jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), IS_CV == IS_CONST);
if (jump_zv != NULL) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv));
ZEND_VM_CONTINUE();
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- retval = zend_hash_find(target_symbol_table, name);
+ retval = zend_hash_find_ex(target_symbol_table, name, IS_CV == IS_CONST);
if (retval == NULL) {
if (UNEXPECTED(zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_THIS)))) {
zval *result;
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- value = zend_hash_find_ind(target_symbol_table, name);
+ value = zend_hash_find_ex_ind(target_symbol_table, name, IS_CV == IS_CONST);
if (IS_CV != IS_CONST) {
zend_tmp_string_release(tmp_name);
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, IS_CV == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
zobj->properties = zend_array_dup(zobj->properties);
}
- property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
+ property_val = zend_hash_find_ex(zobj->properties, Z_STR_P(property), 1);
if (property_val) {
goto fast_assign_obj;
}
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, (IS_TMP_VAR|IS_VAR) == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, IS_CONST == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2));
if (Z_TYPE_P(op) != IS_STRING) {
- ZVAL_DEREF(op);
- if (Z_TYPE_P(op) != IS_STRING) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
/* Wrong type, fall back to ZEND_CASE chain */
ZEND_VM_NEXT_OPCODE();
+ } else {
+ ZVAL_DEREF(op);
+ if (Z_TYPE_P(op) != IS_STRING) {
+ /* Wrong type, fall back to ZEND_CASE chain */
+ ZEND_VM_NEXT_OPCODE();
+ }
}
}
- jump_zv = zend_hash_find(jumptable, Z_STR_P(op));
+ jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), (IS_TMP_VAR|IS_VAR) == IS_CONST);
if (jump_zv != NULL) {
ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv));
ZEND_VM_CONTINUE();
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- retval = zend_hash_find(target_symbol_table, name);
+ retval = zend_hash_find_ex(target_symbol_table, name, (IS_TMP_VAR|IS_VAR) == IS_CONST);
if (retval == NULL) {
if (UNEXPECTED(zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_THIS)))) {
zval *result;
}
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK EXECUTE_DATA_CC);
- value = zend_hash_find_ind(target_symbol_table, name);
+ value = zend_hash_find_ex_ind(target_symbol_table, name, (IS_TMP_VAR|IS_VAR) == IS_CONST);
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
zend_tmp_string_release(tmp_name);
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, IS_CV == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop:
}
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET);
}
- retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
+ retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1);
if (EXPECTED(retval)) {
uintptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
}
}
str_index_prop:
- value = zend_hash_find_ind(ht, str);
+ value = zend_hash_find_ex_ind(ht, str, (IS_TMP_VAR|IS_VAR) == IS_CONST);
} else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
hval = Z_LVAL_P(offset);
num_index_prop: