mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Removed zend_fcall_info.symbol_table
This commit is contained in:
parent
960b3755b3
commit
c67c166f93
21 changed files with 6 additions and 40 deletions
|
@ -3427,7 +3427,6 @@ ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_i
|
|||
fci->param_count = 0;
|
||||
fci->params = NULL;
|
||||
fci->no_separation = 1;
|
||||
fci->symbol_table = NULL;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ typedef struct _zend_fcall_info {
|
|||
size_t size;
|
||||
HashTable *function_table;
|
||||
zval function_name;
|
||||
zend_array *symbol_table;
|
||||
zval *retval;
|
||||
zval *params;
|
||||
zend_object *object;
|
||||
|
@ -470,7 +469,10 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zv
|
|||
|
||||
|
||||
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);
|
||||
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table);
|
||||
ZEND_API int _call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation);
|
||||
|
||||
#define call_user_function_ex(function_table, object, function_name, retval_ptr, param_count, params, no_separation, symbol_table) \
|
||||
_call_user_function_ex(function_table, object, function_name, retval_ptr, param_count, params, no_separation)
|
||||
|
||||
ZEND_API extern const zend_fcall_info empty_fcall_info;
|
||||
ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
|
||||
|
|
|
@ -676,7 +676,6 @@ ZEND_METHOD(exception, __toString)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = &Z_OBJCE_P(exception)->function_table;
|
||||
ZVAL_COPY_VALUE(&fci.function_name, &fname);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ_P(exception);
|
||||
fci.retval = &trace;
|
||||
fci.param_count = 0;
|
||||
|
|
|
@ -668,7 +668,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table) /* {{{ */
|
||||
int _call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation) /* {{{ */
|
||||
{
|
||||
zend_fcall_info fci;
|
||||
|
||||
|
@ -680,7 +680,6 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
|
|||
fci.param_count = param_count;
|
||||
fci.params = params;
|
||||
fci.no_separation = (zend_bool) no_separation;
|
||||
fci.symbol_table = symbol_table;
|
||||
|
||||
return zend_call_function(&fci, NULL);
|
||||
}
|
||||
|
@ -851,13 +850,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
|||
ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
|
||||
}
|
||||
|
||||
/* PHP-7 doesn't support symbol_table substitution for functions */
|
||||
ZEND_ASSERT(fci->symbol_table == NULL);
|
||||
|
||||
if (func->type == ZEND_USER_FUNCTION) {
|
||||
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
|
||||
EG(scope) = func->common.scope;
|
||||
call->symbol_table = fci->symbol_table;
|
||||
call->symbol_table = NULL;
|
||||
if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
|
||||
zend_init_execute_data(call, &func->op_array, fci->retval);
|
||||
zend_execute_ex(call);
|
||||
|
@ -1027,7 +1023,6 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
|
|||
fcall_info.size = sizeof(fcall_info);
|
||||
fcall_info.function_table = EG(function_table);
|
||||
ZVAL_STR_COPY(&fcall_info.function_name, EG(autoload_func)->common.function_name);
|
||||
fcall_info.symbol_table = NULL;
|
||||
fcall_info.retval = &local_retval;
|
||||
fcall_info.param_count = 1;
|
||||
fcall_info.params = args;
|
||||
|
|
|
@ -55,7 +55,6 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
|
|||
fci.param_count = param_count;
|
||||
fci.params = params;
|
||||
fci.no_separation = 1;
|
||||
fci.symbol_table = NULL;
|
||||
|
||||
if (!fn_proxy && !obj_ce) {
|
||||
/* no interest in caching and no information already present that is
|
||||
|
|
|
@ -1345,7 +1345,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
|||
fci.param_count = 2;
|
||||
fci.params = argv;
|
||||
fci.no_separation = 0;
|
||||
fci.symbol_table = NULL;
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = zend_call_function(&fci, &t->fci_cache);
|
||||
|
@ -1396,7 +1395,6 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
|
|||
fci.param_count = 3;
|
||||
fci.params = argv;
|
||||
fci.no_separation = 0;
|
||||
fci.symbol_table = NULL;
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = zend_call_function(&fci, &t->fci_cache);
|
||||
|
@ -1453,7 +1451,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
|
|||
fci.param_count = 5;
|
||||
fci.params = argv;
|
||||
fci.no_separation = 0;
|
||||
fci.symbol_table = NULL;
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = zend_call_function(&fci, &t->fci_cache);
|
||||
|
@ -1516,7 +1513,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
|||
fci.param_count = 3;
|
||||
fci.params = argv;
|
||||
fci.no_separation = 0;
|
||||
fci.symbol_table = NULL;
|
||||
|
||||
ch->in_callback = 1;
|
||||
error = zend_call_function(&fci, &t->fci_cache);
|
||||
|
@ -1579,7 +1575,6 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = EG(function_table);
|
||||
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = NULL;
|
||||
fci.retval = &retval;
|
||||
fci.param_count = 2;
|
||||
|
|
|
@ -188,7 +188,6 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
|
|||
ZVAL_STRING(&fci.function_name, (char *) obj->stringval);
|
||||
xmlXPathFreeObject(obj);
|
||||
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = NULL;
|
||||
fci.retval = &retval;
|
||||
fci.no_separation = 0;
|
||||
|
|
|
@ -1286,7 +1286,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = &ce->function_table;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ_P(return_value);
|
||||
fci.retval = &retval;
|
||||
fci.params = NULL;
|
||||
|
|
|
@ -439,7 +439,6 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
|
|||
fci.function_table = &dbstmt_ce->function_table;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.object = Z_OBJ_P(object);
|
||||
fci.symbol_table = NULL;
|
||||
fci.retval = &retval;
|
||||
fci.param_count = 0;
|
||||
fci.params = NULL;
|
||||
|
|
|
@ -742,7 +742,6 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */
|
|||
if (ce->constructor) {
|
||||
fci->function_table = &ce->function_table;
|
||||
ZVAL_UNDEF(&fci->function_name);
|
||||
fci->symbol_table = NULL;
|
||||
fci->retval = &stmt->fetch.cls.retval;
|
||||
fci->param_count = 0;
|
||||
fci->params = NULL;
|
||||
|
|
|
@ -327,7 +327,6 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
|
|||
fc->fci.size = sizeof(fc->fci);
|
||||
fc->fci.function_table = EG(function_table);
|
||||
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
|
||||
fc->fci.symbol_table = NULL;
|
||||
fc->fci.object = NULL;
|
||||
fc->fci.retval = &retval;
|
||||
fc->fci.param_count = fake_argc;
|
||||
|
@ -478,7 +477,6 @@ static int php_sqlite3_collation_callback(void *context,
|
|||
collation->fc.fci.size = sizeof(collation->fc.fci);
|
||||
collation->fc.fci.function_table = EG(function_table);
|
||||
ZVAL_COPY_VALUE(&collation->fc.fci.function_name, &collation->callback);
|
||||
collation->fc.fci.symbol_table = NULL;
|
||||
collation->fc.fci.object = NULL;
|
||||
collation->fc.fci.retval = &retval;
|
||||
|
||||
|
|
|
@ -2826,7 +2826,6 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = &ce->function_table;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ_P(return_value);
|
||||
fci.retval = &retval;
|
||||
fci.params = NULL;
|
||||
|
|
|
@ -1430,7 +1430,6 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = NULL;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ(reflector);
|
||||
fci.retval = &retval;
|
||||
fci.param_count = ctor_argc;
|
||||
|
@ -1965,7 +1964,6 @@ ZEND_METHOD(reflection_function, invoke)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = NULL;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = NULL;
|
||||
fci.retval = &retval;
|
||||
fci.param_count = num_args;
|
||||
|
@ -2025,7 +2023,6 @@ ZEND_METHOD(reflection_function, invokeArgs)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = NULL;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = NULL;
|
||||
fci.retval = &retval;
|
||||
fci.param_count = argc;
|
||||
|
@ -3257,7 +3254,6 @@ ZEND_METHOD(reflection_method, invoke)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = NULL;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = object;
|
||||
fci.retval = &retval;
|
||||
fci.param_count = num_args - 1;
|
||||
|
@ -3364,7 +3360,6 @@ ZEND_METHOD(reflection_method, invokeArgs)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = NULL;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = object ? Z_OBJ_P(object) : NULL;
|
||||
fci.retval = &retval;
|
||||
fci.param_count = argc;
|
||||
|
@ -4897,7 +4892,6 @@ ZEND_METHOD(reflection_class, newInstance)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = EG(function_table);
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ_P(return_value);
|
||||
fci.retval = &retval;
|
||||
fci.param_count = num_args;
|
||||
|
@ -5001,7 +4995,6 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = EG(function_table);
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ_P(return_value);
|
||||
fci.retval = &retval;
|
||||
fci.param_count = argc;
|
||||
|
|
|
@ -955,7 +955,6 @@ PHP_METHOD(SoapFault, __toString)
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = &Z_OBJCE_P(getThis())->function_table;
|
||||
ZVAL_STRINGL(&fci.function_name, "gettraceasstring", sizeof("gettraceasstring")-1);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ(EX(This));
|
||||
fci.retval = &trace;
|
||||
fci.param_count = 0;
|
||||
|
|
|
@ -2081,7 +2081,6 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
|
|||
fci.param_count = num_args;
|
||||
fci.params = params;
|
||||
fci.no_separation = 1;
|
||||
fci.symbol_table = NULL;
|
||||
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
|
||||
|
||||
fcic.initialized = 1;
|
||||
|
|
|
@ -65,7 +65,6 @@ static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, in
|
|||
fci.function_table = &pce->function_table;
|
||||
ZVAL_STR(&fci.function_name, func->common.function_name);
|
||||
fci.object = Z_OBJ_P(retval);
|
||||
fci.symbol_table = NULL;
|
||||
fci.retval = &dummy;
|
||||
fci.param_count = argc;
|
||||
fci.params = argv;
|
||||
|
|
|
@ -685,7 +685,6 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
|
|||
fc->fci.size = sizeof(fc->fci);
|
||||
fc->fci.function_table = EG(function_table);
|
||||
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
|
||||
fc->fci.symbol_table = NULL;
|
||||
fc->fci.object = NULL;
|
||||
fc->fci.retval = &retval;
|
||||
fc->fci.param_count = fake_argc;
|
||||
|
@ -844,7 +843,6 @@ static int php_sqlite3_callback_compare(void *coll, int a_len, const void *a, in
|
|||
collation->fci.fci.size = (sizeof(collation->fci.fci));
|
||||
collation->fci.fci.function_table = EG(function_table);
|
||||
ZVAL_COPY_VALUE(&collation->fci.fci.function_name, &collation->cmp_func);
|
||||
collation->fci.fci.symbol_table = NULL;
|
||||
collation->fci.fci.object = NULL;
|
||||
collation->fci.fci.retval = &retval;
|
||||
collation->fci.fci.param_count = 2;
|
||||
|
|
|
@ -485,7 +485,6 @@ static void xml_call_handler(xml_parser *parser, zval *handler, zend_function *f
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = EG(function_table);
|
||||
ZVAL_COPY_VALUE(&fci.function_name, handler);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ(parser->object);
|
||||
fci.retval = retval;
|
||||
fci.param_count = argc;
|
||||
|
|
|
@ -320,7 +320,6 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
|
|||
xmlXPathFreeObject(obj);
|
||||
|
||||
ZVAL_COPY_VALUE(&fci.function_name, &handler);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = NULL;
|
||||
fci.retval = &retval;
|
||||
fci.no_separation = 0;
|
||||
|
|
|
@ -301,7 +301,6 @@ static void user_stream_create_object(struct php_user_stream_wrapper *uwrap, php
|
|||
fci.size = sizeof(fci);
|
||||
fci.function_table = &uwrap->ce->function_table;
|
||||
ZVAL_UNDEF(&fci.function_name);
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = Z_OBJ_P(object);
|
||||
fci.retval = &retval;
|
||||
fci.param_count = 0;
|
||||
|
|
|
@ -122,7 +122,6 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */
|
|||
fci.size = sizeof(zend_fcall_info);
|
||||
fci.function_table = &PHPDBG_G(registered);
|
||||
//???fci.symbol_table = zend_rebuild_symbol_table();
|
||||
fci.symbol_table = NULL;
|
||||
fci.object = NULL;
|
||||
fci.retval = &fretval;
|
||||
fci.no_separation = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue