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;
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)) {
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;
}