Lines Matching refs:compiler_globals

265 …byte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte,      zend_compiler_globals, compiler_globals)
267 …code", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
712 static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{{ */ in compiler_globals_ctor() argument
714 compiler_globals->compiled_filename = NULL; in compiler_globals_ctor()
715 compiler_globals->zend_lineno = 0; in compiler_globals_ctor()
717 compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); in compiler_globals_ctor()
718 zend_hash_init(compiler_globals->function_table, 1024, NULL, ZEND_FUNCTION_DTOR, 1); in compiler_globals_ctor()
719 zend_hash_copy(compiler_globals->function_table, global_function_table, NULL); in compiler_globals_ctor()
720compiler_globals->copied_functions_count = zend_hash_num_elements(compiler_globals->function_table… in compiler_globals_ctor()
722 compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); in compiler_globals_ctor()
723 zend_hash_init(compiler_globals->class_table, 64, NULL, ZEND_CLASS_DTOR, 1); in compiler_globals_ctor()
724 zend_hash_copy(compiler_globals->class_table, global_class_table, zend_class_add_ref); in compiler_globals_ctor()
728 compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable)); in compiler_globals_ctor()
729 zend_hash_init(compiler_globals->auto_globals, 8, NULL, auto_global_dtor, 1); in compiler_globals_ctor()
730 zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, auto_global_copy_ctor); in compiler_globals_ctor()
732 compiler_globals->script_encoding_list = NULL; in compiler_globals_ctor()
733 compiler_globals->current_linking_class = NULL; in compiler_globals_ctor()
736 compiler_globals->map_ptr_real_base = NULL; in compiler_globals_ctor()
737 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(NULL); in compiler_globals_ctor()
738 compiler_globals->map_ptr_size = 0; in compiler_globals_ctor()
739 compiler_globals->map_ptr_last = global_map_ptr_last; in compiler_globals_ctor()
740 compiler_globals->internal_run_time_cache = NULL; in compiler_globals_ctor()
741 if (compiler_globals->map_ptr_last || zend_map_ptr_static_size) { in compiler_globals_ctor()
743 compiler_globals->map_ptr_size = ZEND_MM_ALIGNED_SIZE_EX(compiler_globals->map_ptr_last, 4096); in compiler_globals_ctor()
744 …void *base = pemalloc((zend_map_ptr_static_size + compiler_globals->map_ptr_size) * sizeof(void*),… in compiler_globals_ctor()
745 compiler_globals->map_ptr_real_base = base; in compiler_globals_ctor()
746 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(base); in compiler_globals_ctor()
747 memset(base, 0, (zend_map_ptr_static_size + compiler_globals->map_ptr_last) * sizeof(void*)); in compiler_globals_ctor()
753 static void compiler_globals_dtor(zend_compiler_globals *compiler_globals) /* {{{ */ in compiler_globals_dtor() argument
755 if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) { in compiler_globals_dtor()
756 uint32_t n = compiler_globals->copied_functions_count; in compiler_globals_dtor()
759 if (zend_hash_num_elements(compiler_globals->function_table) <= n) { in compiler_globals_dtor()
760 compiler_globals->function_table->nNumUsed = 0; in compiler_globals_dtor()
762 Bucket *p = compiler_globals->function_table->arData; in compiler_globals_dtor()
764 compiler_globals->function_table->nNumOfElements -= n; in compiler_globals_dtor()
771 zend_hash_destroy(compiler_globals->function_table); in compiler_globals_dtor()
772 free(compiler_globals->function_table); in compiler_globals_dtor()
774 if (compiler_globals->class_table != GLOBAL_CLASS_TABLE) { in compiler_globals_dtor()
776 zend_hash_graceful_reverse_destroy(compiler_globals->class_table); in compiler_globals_dtor()
777 free(compiler_globals->class_table); in compiler_globals_dtor()
779 if (compiler_globals->auto_globals != GLOBAL_AUTO_GLOBALS_TABLE) { in compiler_globals_dtor()
780 zend_hash_destroy(compiler_globals->auto_globals); in compiler_globals_dtor()
781 free(compiler_globals->auto_globals); in compiler_globals_dtor()
783 if (compiler_globals->script_encoding_list) { in compiler_globals_dtor()
784 pefree((char*)compiler_globals->script_encoding_list, 1); in compiler_globals_dtor()
786 if (compiler_globals->map_ptr_real_base) { in compiler_globals_dtor()
787 free(compiler_globals->map_ptr_real_base); in compiler_globals_dtor()
788 compiler_globals->map_ptr_real_base = NULL; in compiler_globals_dtor()
789 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(NULL); in compiler_globals_dtor()
790 compiler_globals->map_ptr_size = 0; in compiler_globals_dtor()
792 if (compiler_globals->internal_run_time_cache) { in compiler_globals_dtor()
793 pefree(compiler_globals->internal_run_time_cache, 1); in compiler_globals_dtor()
794 compiler_globals->internal_run_time_cache = NULL; in compiler_globals_dtor()
919 zend_compiler_globals *compiler_globals; in zend_startup() local
1024 compiler_globals = ts_resource(compiler_globals_id); in zend_startup()
1027 compiler_globals_dtor(compiler_globals); in zend_startup()
1028 compiler_globals->in_compilation = 0; in zend_startup()
1029 compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); in zend_startup()
1030 compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); in zend_startup()
1032 *compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE; in zend_startup()
1033 *compiler_globals->class_table = *GLOBAL_CLASS_TABLE; in zend_startup()
1034 compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE; in zend_startup()
1095 zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id); in zend_post_startup() local
1111 *GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table; in zend_post_startup()
1112 *GLOBAL_CLASS_TABLE = *compiler_globals->class_table; in zend_post_startup()
1114 global_map_ptr_last = compiler_globals->map_ptr_last; in zend_post_startup()
1120 free(compiler_globals->function_table); in zend_post_startup()
1121 compiler_globals->function_table = NULL; in zend_post_startup()
1122 free(compiler_globals->class_table); in zend_post_startup()
1123 compiler_globals->class_table = NULL; in zend_post_startup()
1124 if (compiler_globals->map_ptr_real_base) { in zend_post_startup()
1125 free(compiler_globals->map_ptr_real_base); in zend_post_startup()
1127 compiler_globals->map_ptr_real_base = NULL; in zend_post_startup()
1128 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(NULL); in zend_post_startup()
1129 if (compiler_globals->internal_run_time_cache) { in zend_post_startup()
1130 pefree(compiler_globals->internal_run_time_cache, 1); in zend_post_startup()
1132 compiler_globals->internal_run_time_cache = NULL; in zend_post_startup()
1133 if ((script_encoding_list = (zend_encoding **)compiler_globals->script_encoding_list)) { in zend_post_startup()
1134 compiler_globals_ctor(compiler_globals); in zend_post_startup()
1135 compiler_globals->script_encoding_list = (const zend_encoding **)script_encoding_list; in zend_post_startup()
1137 compiler_globals_ctor(compiler_globals); in zend_post_startup()