Remove CG(filenames_table)

This doesn't seem to serve any purpose anymore.
This commit is contained in:
Nikita Popov 2020-09-03 11:30:58 +02:00
parent 397a692735
commit c4016ecd44
2 changed files with 0 additions and 15 deletions

View file

@ -412,7 +412,6 @@ void init_compiler(void) /* {{{ */
memset(&CG(context), 0, sizeof(CG(context)));
zend_init_compiler_data_structures();
zend_init_rsrc_list();
zend_hash_init(&CG(filenames_table), 8, NULL, ZVAL_PTR_DTOR, 0);
zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) file_handle_dtor, 0);
CG(unclean_shutdown) = 0;
@ -426,7 +425,6 @@ void shutdown_compiler(void) /* {{{ */
zend_stack_destroy(&CG(loop_var_stack));
zend_stack_destroy(&CG(delayed_oplines_stack));
zend_stack_destroy(&CG(short_circuiting_opnums));
zend_hash_destroy(&CG(filenames_table));
zend_arena_destroy(CG(arena));
if (CG(delayed_variance_obligations)) {
@ -444,18 +442,7 @@ void shutdown_compiler(void) /* {{{ */
ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename) /* {{{ */
{
zval *p, rv;
if ((p = zend_hash_find(&CG(filenames_table), new_compiled_filename))) {
ZEND_ASSERT(Z_TYPE_P(p) == IS_STRING);
CG(compiled_filename) = Z_STR_P(p);
return Z_STR_P(p);
}
new_compiled_filename = zend_new_interned_string(zend_string_copy(new_compiled_filename));
ZVAL_STR(&rv, new_compiled_filename);
zend_hash_add_new(&CG(filenames_table), new_compiled_filename, &rv);
CG(compiled_filename) = new_compiled_filename;
return new_compiled_filename;
}

View file

@ -77,8 +77,6 @@ struct _zend_compiler_globals {
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable filenames_table;
HashTable *auto_globals;
/* Refer to zend_yytnamerr() in zend_language_parser.y for meaning of values */