h. zend_register_persistent_resource()
i. RAND_RANGE()
j. cast_object() with _IS_NUMBER
+ k. zend_fcall_info_cache.initialized
2. Build system changes
a. Unix build system changes
handler should return either an integer or float value in this case,
whichever is more appropriate.
+ k. zend_fcall_info_cache.initialized is removed. zend_fcall_info_cache is
+ initialized if zend_fcall_info_cache.function_handler is set.
+
========================
2. Build system changes
========================
if (check_null && Z_TYPE_P(arg) == IS_NULL) {
fci->size = 0;
- fcc->initialized = 0;
+ fcc->function_handler = 0;
break;
}
zv = zend_hash_find(EG(function_table), lmname);
if (EXPECTED(zv != NULL)) {
fcc->function_handler = Z_PTR_P(zv);
- fcc->initialized = 1;
if (lmname != Z_STR_P(callable)) {
ZSTR_ALLOCA_FREE(lmname, use_heap);
}
zv = zend_hash_find(EG(function_table), lmname);
if (zv != NULL) {
fcc->function_handler = Z_PTR_P(zv);
- fcc->initialized = 1;
ZSTR_ALLOCA_FREE(lmname, use_heap);
return 1;
}
fcc->called_scope = fcc->object->ce;
}
if (retval) {
- fcc->initialized = 1;
+//??? fcc->initialized = 1;
}
return retval;
}
*error = NULL;
}
- fcc->initialized = 0;
fcc->calling_scope = NULL;
fcc->called_scope = NULL;
fcc->function_handler = NULL;
case IS_OBJECT:
if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) {
fcc->called_scope = fcc->calling_scope;
- fcc->initialized = 1;
return 1;
}
if (error) zend_spprintf(error, 0, "no array or string given");
} zend_fcall_info;
typedef struct _zend_fcall_info_cache {
- zend_bool initialized;
zend_function *function_handler;
zend_class_entry *calling_scope;
zend_class_entry *called_scope;
{
if (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) {
dest_fci->size = 0;
- dest_fcc->initialized = 0;
+ dest_fcc->function_handler = NULL;
*error = NULL;
} else if (UNEXPECTED(zend_fcall_info_init(arg, 0, dest_fci, dest_fcc, NULL, error) != SUCCESS)) {
return 0;
fci.params = my_params;
fci.param_count = my_param_count;
fci.object = fci_cache.object = newobj;
- fci_cache.initialized = 1;
fci_cache.called_scope = Z_OBJCE_P(newthis);
if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_GENERATOR) {
fci.size = sizeof(zend_fcall_info);
fci.retval = return_value;
- fcc.initialized = 1;
fcc.function_handler = (zend_function *) EX(func)->common.arg_info;
fci.params = params;
fci.param_count = 2;
EG(current_execute_data) = &dummy_execute_data;
}
- if (!fci_cache || !fci_cache->initialized) {
+ if (!fci_cache || !fci_cache->function_handler) {
char *error = NULL;
if (!fci_cache) {
EG(opline_before_exception) = current_opline_before_exception;
if (call_via_handler) {
/* We must re-initialize function again */
- fci_cache->initialized = 0;
+ fci_cache->function_handler = NULL;
}
} else if (func->type == ZEND_INTERNAL_FUNCTION) {
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
if (call_via_handler) {
/* We must re-initialize function again */
- fci_cache->initialized = 0;
+ fci_cache->function_handler = NULL;
}
} else { /* ZEND_OVERLOADED_FUNCTION */
ZVAL_NULL(fci->retval);
fcall_info.object = NULL;
fcall_info.no_separation = 1;
- fcall_cache.initialized = 1;
fcall_cache.function_handler = EG(autoload_func);
fcall_cache.calling_scope = NULL;
fcall_cache.called_scope = NULL;
zend_fcall_info_cache fcic;
ZVAL_UNDEF(&fci.function_name); /* Unused */
- fcic.initialized = 1;
if (!obj_ce) {
obj_ce = object ? Z_OBJCE_P(object) : NULL;
}
}
}
- fcc.initialized = 1;
fcc.function_handler = ce->constructor;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
zend_fcall_info_args(&fci, ctor_args);
- fcc.initialized = 1;
fcc.function_handler = dbstmt_ce->constructor;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(object);
zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args);
- fcc->initialized = 1;
fcc->function_handler = ce->constructor;
fcc->calling_scope = zend_get_executed_scope();
fcc->called_scope = ce;
}
}
- fcc.initialized = 1;
fcc.function_handler = ce->constructor;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fci.params = params;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = ce_ptr->constructor;
fcc.calling_scope = ce_ptr;
fcc.called_scope = Z_OBJCE(reflector);
fci.params = params;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = fptr;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = NULL;
fci.params = params;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = fptr;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = NULL;
fci.params = params;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = mptr;
fcc.calling_scope = obj_ce;
fcc.called_scope = intern->ce;
fci.params = params;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = constructor;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fci.params = params;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = constructor;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fci.no_separation = 1;
ZVAL_UNDEF(&fci.function_name); /* Unused */
- fcic.initialized = 1;
zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &pos);
while (zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &num_idx, &pos) == HASH_KEY_IS_STRING) {
fci.no_separation = 1;
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
- fcic.initialized = 1;
fcic.function_handler = func_ptr;
fcic.calling_scope = NULL;
fcic.called_scope = NULL;
fci.params = argv;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = func;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = pce;
fci.params = NULL;
fci.no_separation = 1;
- fcc.initialized = 1;
fcc.function_handler = uwrap->ce->constructor;
fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(object);