Skip to content

Commit c67c166

Browse files
committed
Removed zend_fcall_info.symbol_table
1 parent 960b375 commit c67c166

File tree

21 files changed

+6
-40
lines changed

21 files changed

+6
-40
lines changed

Zend/zend_API.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3427,7 +3427,6 @@ ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_i
34273427
fci->param_count = 0;
34283428
fci->params = NULL;
34293429
fci->no_separation = 1;
3430-
fci->symbol_table = NULL;
34313430

34323431
return SUCCESS;
34333432
}

Zend/zend_API.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ typedef struct _zend_fcall_info {
4545
size_t size;
4646
HashTable *function_table;
4747
zval function_name;
48-
zend_array *symbol_table;
4948
zval *retval;
5049
zval *params;
5150
zend_object *object;
@@ -470,7 +469,10 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zv
470469

471470

472471
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);
473-
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);
472+
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);
473+
474+
#define call_user_function_ex(function_table, object, function_name, retval_ptr, param_count, params, no_separation, symbol_table) \
475+
_call_user_function_ex(function_table, object, function_name, retval_ptr, param_count, params, no_separation)
474476

475477
ZEND_API extern const zend_fcall_info empty_fcall_info;
476478
ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;

Zend/zend_exceptions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ ZEND_METHOD(exception, __toString)
676676
fci.size = sizeof(fci);
677677
fci.function_table = &Z_OBJCE_P(exception)->function_table;
678678
ZVAL_COPY_VALUE(&fci.function_name, &fname);
679-
fci.symbol_table = NULL;
680679
fci.object = Z_OBJ_P(exception);
681680
fci.retval = &trace;
682681
fci.param_count = 0;

Zend/zend_execute_API.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
668668
}
669669
/* }}} */
670670

671-
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) /* {{{ */
671+
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) /* {{{ */
672672
{
673673
zend_fcall_info fci;
674674

@@ -680,7 +680,6 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
680680
fci.param_count = param_count;
681681
fci.params = params;
682682
fci.no_separation = (zend_bool) no_separation;
683-
fci.symbol_table = symbol_table;
684683

685684
return zend_call_function(&fci, NULL);
686685
}
@@ -851,13 +850,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
851850
ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
852851
}
853852

854-
/* PHP-7 doesn't support symbol_table substitution for functions */
855-
ZEND_ASSERT(fci->symbol_table == NULL);
856-
857853
if (func->type == ZEND_USER_FUNCTION) {
858854
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
859855
EG(scope) = func->common.scope;
860-
call->symbol_table = fci->symbol_table;
856+
call->symbol_table = NULL;
861857
if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
862858
zend_init_execute_data(call, &func->op_array, fci->retval);
863859
zend_execute_ex(call);
@@ -1027,7 +1023,6 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
10271023
fcall_info.size = sizeof(fcall_info);
10281024
fcall_info.function_table = EG(function_table);
10291025
ZVAL_STR_COPY(&fcall_info.function_name, EG(autoload_func)->common.function_name);
1030-
fcall_info.symbol_table = NULL;
10311026
fcall_info.retval = &local_retval;
10321027
fcall_info.param_count = 1;
10331028
fcall_info.params = args;

Zend/zend_interfaces.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
5555
fci.param_count = param_count;
5656
fci.params = params;
5757
fci.no_separation = 1;
58-
fci.symbol_table = NULL;
5958

6059
if (!fn_proxy && !obj_ce) {
6160
/* no interest in caching and no information already present that is

ext/curl/interface.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
13451345
fci.param_count = 2;
13461346
fci.params = argv;
13471347
fci.no_separation = 0;
1348-
fci.symbol_table = NULL;
13491348

13501349
ch->in_callback = 1;
13511350
error = zend_call_function(&fci, &t->fci_cache);
@@ -1396,7 +1395,6 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
13961395
fci.param_count = 3;
13971396
fci.params = argv;
13981397
fci.no_separation = 0;
1399-
fci.symbol_table = NULL;
14001398

14011399
ch->in_callback = 1;
14021400
error = zend_call_function(&fci, &t->fci_cache);
@@ -1453,7 +1451,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
14531451
fci.param_count = 5;
14541452
fci.params = argv;
14551453
fci.no_separation = 0;
1456-
fci.symbol_table = NULL;
14571454

14581455
ch->in_callback = 1;
14591456
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)
15161513
fci.param_count = 3;
15171514
fci.params = argv;
15181515
fci.no_separation = 0;
1519-
fci.symbol_table = NULL;
15201516

15211517
ch->in_callback = 1;
15221518
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
15791575
fci.size = sizeof(fci);
15801576
fci.function_table = EG(function_table);
15811577
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
1582-
fci.symbol_table = NULL;
15831578
fci.object = NULL;
15841579
fci.retval = &retval;
15851580
fci.param_count = 2;

ext/dom/xpath.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
188188
ZVAL_STRING(&fci.function_name, (char *) obj->stringval);
189189
xmlXPathFreeObject(obj);
190190

191-
fci.symbol_table = NULL;
192191
fci.object = NULL;
193192
fci.retval = &retval;
194193
fci.no_separation = 0;

ext/mysqli/mysqli.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
12861286
fci.size = sizeof(fci);
12871287
fci.function_table = &ce->function_table;
12881288
ZVAL_UNDEF(&fci.function_name);
1289-
fci.symbol_table = NULL;
12901289
fci.object = Z_OBJ_P(return_value);
12911290
fci.retval = &retval;
12921291
fci.params = NULL;

ext/pdo/pdo_dbh.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
439439
fci.function_table = &dbstmt_ce->function_table;
440440
ZVAL_UNDEF(&fci.function_name);
441441
fci.object = Z_OBJ_P(object);
442-
fci.symbol_table = NULL;
443442
fci.retval = &retval;
444443
fci.param_count = 0;
445444
fci.params = NULL;

ext/pdo/pdo_stmt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,6 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */
742742
if (ce->constructor) {
743743
fci->function_table = &ce->function_table;
744744
ZVAL_UNDEF(&fci->function_name);
745-
fci->symbol_table = NULL;
746745
fci->retval = &stmt->fetch.cls.retval;
747746
fci->param_count = 0;
748747
fci->params = NULL;

ext/pdo_sqlite/sqlite_driver.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
327327
fc->fci.size = sizeof(fc->fci);
328328
fc->fci.function_table = EG(function_table);
329329
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
330-
fc->fci.symbol_table = NULL;
331330
fc->fci.object = NULL;
332331
fc->fci.retval = &retval;
333332
fc->fci.param_count = fake_argc;
@@ -478,7 +477,6 @@ static int php_sqlite3_collation_callback(void *context,
478477
collation->fc.fci.size = sizeof(collation->fc.fci);
479478
collation->fc.fci.function_table = EG(function_table);
480479
ZVAL_COPY_VALUE(&collation->fc.fci.function_name, &collation->callback);
481-
collation->fc.fci.symbol_table = NULL;
482480
collation->fc.fci.object = NULL;
483481
collation->fc.fci.retval = &retval;
484482

ext/pgsql/pgsql.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,6 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
28262826
fci.size = sizeof(fci);
28272827
fci.function_table = &ce->function_table;
28282828
ZVAL_UNDEF(&fci.function_name);
2829-
fci.symbol_table = NULL;
28302829
fci.object = Z_OBJ_P(return_value);
28312830
fci.retval = &retval;
28322831
fci.params = NULL;

ext/reflection/php_reflection.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,6 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
14301430
fci.size = sizeof(fci);
14311431
fci.function_table = NULL;
14321432
ZVAL_UNDEF(&fci.function_name);
1433-
fci.symbol_table = NULL;
14341433
fci.object = Z_OBJ(reflector);
14351434
fci.retval = &retval;
14361435
fci.param_count = ctor_argc;
@@ -1965,7 +1964,6 @@ ZEND_METHOD(reflection_function, invoke)
19651964
fci.size = sizeof(fci);
19661965
fci.function_table = NULL;
19671966
ZVAL_UNDEF(&fci.function_name);
1968-
fci.symbol_table = NULL;
19691967
fci.object = NULL;
19701968
fci.retval = &retval;
19711969
fci.param_count = num_args;
@@ -2025,7 +2023,6 @@ ZEND_METHOD(reflection_function, invokeArgs)
20252023
fci.size = sizeof(fci);
20262024
fci.function_table = NULL;
20272025
ZVAL_UNDEF(&fci.function_name);
2028-
fci.symbol_table = NULL;
20292026
fci.object = NULL;
20302027
fci.retval = &retval;
20312028
fci.param_count = argc;
@@ -3257,7 +3254,6 @@ ZEND_METHOD(reflection_method, invoke)
32573254
fci.size = sizeof(fci);
32583255
fci.function_table = NULL;
32593256
ZVAL_UNDEF(&fci.function_name);
3260-
fci.symbol_table = NULL;
32613257
fci.object = object;
32623258
fci.retval = &retval;
32633259
fci.param_count = num_args - 1;
@@ -3364,7 +3360,6 @@ ZEND_METHOD(reflection_method, invokeArgs)
33643360
fci.size = sizeof(fci);
33653361
fci.function_table = NULL;
33663362
ZVAL_UNDEF(&fci.function_name);
3367-
fci.symbol_table = NULL;
33683363
fci.object = object ? Z_OBJ_P(object) : NULL;
33693364
fci.retval = &retval;
33703365
fci.param_count = argc;
@@ -4897,7 +4892,6 @@ ZEND_METHOD(reflection_class, newInstance)
48974892
fci.size = sizeof(fci);
48984893
fci.function_table = EG(function_table);
48994894
ZVAL_UNDEF(&fci.function_name);
4900-
fci.symbol_table = NULL;
49014895
fci.object = Z_OBJ_P(return_value);
49024896
fci.retval = &retval;
49034897
fci.param_count = num_args;
@@ -5001,7 +4995,6 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
50014995
fci.size = sizeof(fci);
50024996
fci.function_table = EG(function_table);
50034997
ZVAL_UNDEF(&fci.function_name);
5004-
fci.symbol_table = NULL;
50054998
fci.object = Z_OBJ_P(return_value);
50064999
fci.retval = &retval;
50075000
fci.param_count = argc;

ext/soap/soap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,6 @@ PHP_METHOD(SoapFault, __toString)
955955
fci.size = sizeof(fci);
956956
fci.function_table = &Z_OBJCE_P(getThis())->function_table;
957957
ZVAL_STRINGL(&fci.function_name, "gettraceasstring", sizeof("gettraceasstring")-1);
958-
fci.symbol_table = NULL;
959958
fci.object = Z_OBJ(EX(This));
960959
fci.retval = &trace;
961960
fci.param_count = 0;

ext/spl/spl_directory.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2081,7 +2081,6 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
20812081
fci.param_count = num_args;
20822082
fci.params = params;
20832083
fci.no_separation = 1;
2084-
fci.symbol_table = NULL;
20852084
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
20862085

20872086
fcic.initialized = 1;

ext/spl/spl_engine.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, in
6565
fci.function_table = &pce->function_table;
6666
ZVAL_STR(&fci.function_name, func->common.function_name);
6767
fci.object = Z_OBJ_P(retval);
68-
fci.symbol_table = NULL;
6968
fci.retval = &dummy;
7069
fci.param_count = argc;
7170
fci.params = argv;

ext/sqlite3/sqlite3.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,6 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
685685
fc->fci.size = sizeof(fc->fci);
686686
fc->fci.function_table = EG(function_table);
687687
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
688-
fc->fci.symbol_table = NULL;
689688
fc->fci.object = NULL;
690689
fc->fci.retval = &retval;
691690
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
844843
collation->fci.fci.size = (sizeof(collation->fci.fci));
845844
collation->fci.fci.function_table = EG(function_table);
846845
ZVAL_COPY_VALUE(&collation->fci.fci.function_name, &collation->cmp_func);
847-
collation->fci.fci.symbol_table = NULL;
848846
collation->fci.fci.object = NULL;
849847
collation->fci.fci.retval = &retval;
850848
collation->fci.fci.param_count = 2;

ext/xml/xml.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ static void xml_call_handler(xml_parser *parser, zval *handler, zend_function *f
485485
fci.size = sizeof(fci);
486486
fci.function_table = EG(function_table);
487487
ZVAL_COPY_VALUE(&fci.function_name, handler);
488-
fci.symbol_table = NULL;
489488
fci.object = Z_OBJ(parser->object);
490489
fci.retval = retval;
491490
fci.param_count = argc;

ext/xsl/xsltprocessor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
320320
xmlXPathFreeObject(obj);
321321

322322
ZVAL_COPY_VALUE(&fci.function_name, &handler);
323-
fci.symbol_table = NULL;
324323
fci.object = NULL;
325324
fci.retval = &retval;
326325
fci.no_separation = 0;

main/streams/userspace.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ static void user_stream_create_object(struct php_user_stream_wrapper *uwrap, php
301301
fci.size = sizeof(fci);
302302
fci.function_table = &uwrap->ce->function_table;
303303
ZVAL_UNDEF(&fci.function_name);
304-
fci.symbol_table = NULL;
305304
fci.object = Z_OBJ_P(object);
306305
fci.retval = &retval;
307306
fci.param_count = 0;

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */
122122
fci.size = sizeof(zend_fcall_info);
123123
fci.function_table = &PHPDBG_G(registered);
124124
//???fci.symbol_table = zend_rebuild_symbol_table();
125-
fci.symbol_table = NULL;
126125
fci.object = NULL;
127126
fci.retval = &fretval;
128127
fci.no_separation = 1;

0 commit comments

Comments
 (0)