Skip to content

Commit c4016ec

Browse files
committed
Remove CG(filenames_table)
This doesn't seem to serve any purpose anymore.
1 parent 397a692 commit c4016ec

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

Zend/zend_compile.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ void init_compiler(void) /* {{{ */
412412
memset(&CG(context), 0, sizeof(CG(context)));
413413
zend_init_compiler_data_structures();
414414
zend_init_rsrc_list();
415-
zend_hash_init(&CG(filenames_table), 8, NULL, ZVAL_PTR_DTOR, 0);
416415
zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) file_handle_dtor, 0);
417416
CG(unclean_shutdown) = 0;
418417

@@ -426,7 +425,6 @@ void shutdown_compiler(void) /* {{{ */
426425
zend_stack_destroy(&CG(loop_var_stack));
427426
zend_stack_destroy(&CG(delayed_oplines_stack));
428427
zend_stack_destroy(&CG(short_circuiting_opnums));
429-
zend_hash_destroy(&CG(filenames_table));
430428
zend_arena_destroy(CG(arena));
431429

432430
if (CG(delayed_variance_obligations)) {
@@ -444,18 +442,7 @@ void shutdown_compiler(void) /* {{{ */
444442

445443
ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename) /* {{{ */
446444
{
447-
zval *p, rv;
448-
449-
if ((p = zend_hash_find(&CG(filenames_table), new_compiled_filename))) {
450-
ZEND_ASSERT(Z_TYPE_P(p) == IS_STRING);
451-
CG(compiled_filename) = Z_STR_P(p);
452-
return Z_STR_P(p);
453-
}
454-
455445
new_compiled_filename = zend_new_interned_string(zend_string_copy(new_compiled_filename));
456-
ZVAL_STR(&rv, new_compiled_filename);
457-
zend_hash_add_new(&CG(filenames_table), new_compiled_filename, &rv);
458-
459446
CG(compiled_filename) = new_compiled_filename;
460447
return new_compiled_filename;
461448
}

Zend/zend_globals.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ struct _zend_compiler_globals {
7777
HashTable *function_table; /* function symbol table */
7878
HashTable *class_table; /* class table */
7979

80-
HashTable filenames_table;
81-
8280
HashTable *auto_globals;
8381

8482
/* Refer to zend_yytnamerr() in zend_language_parser.y for meaning of values */

0 commit comments

Comments
 (0)