Lines Matching refs:compiler_globals

203 …byte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte,      zend_compiler_globals, compiler_globals)
205 …code", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
706 static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{{ */ in compiler_globals_ctor() argument
708 compiler_globals->compiled_filename = NULL; in compiler_globals_ctor()
710 compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); in compiler_globals_ctor()
711 zend_hash_init(compiler_globals->function_table, 1024, NULL, ZEND_FUNCTION_DTOR, 1); in compiler_globals_ctor()
712 zend_hash_copy(compiler_globals->function_table, global_function_table, function_copy_ctor); in compiler_globals_ctor()
714 compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); in compiler_globals_ctor()
715 zend_hash_init(compiler_globals->class_table, 64, NULL, ZEND_CLASS_DTOR, 1); in compiler_globals_ctor()
716 zend_hash_copy(compiler_globals->class_table, global_class_table, zend_class_add_ref); in compiler_globals_ctor()
720 compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable)); in compiler_globals_ctor()
721 zend_hash_init(compiler_globals->auto_globals, 8, NULL, auto_global_dtor, 1); in compiler_globals_ctor()
722 zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, auto_global_copy_ctor); in compiler_globals_ctor()
724 compiler_globals->script_encoding_list = NULL; in compiler_globals_ctor()
725 compiler_globals->current_linking_class = NULL; in compiler_globals_ctor()
729 compiler_globals->map_ptr_real_base = NULL; in compiler_globals_ctor()
730 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(NULL); in compiler_globals_ctor()
731 compiler_globals->map_ptr_size = 0; in compiler_globals_ctor()
732 compiler_globals->map_ptr_last = global_map_ptr_last; in compiler_globals_ctor()
733 if (compiler_globals->map_ptr_last) { in compiler_globals_ctor()
735 compiler_globals->map_ptr_size = ZEND_MM_ALIGNED_SIZE_EX(compiler_globals->map_ptr_last, 4096); in compiler_globals_ctor()
736 void *base = pemalloc(compiler_globals->map_ptr_size * sizeof(void*), 1); in compiler_globals_ctor()
737 compiler_globals->map_ptr_real_base = base; in compiler_globals_ctor()
738 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(base); in compiler_globals_ctor()
739 memset(base, 0, compiler_globals->map_ptr_last * sizeof(void*)); in compiler_globals_ctor()
747 static void compiler_globals_dtor(zend_compiler_globals *compiler_globals) /* {{{ */ in compiler_globals_dtor() argument
749 if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) { in compiler_globals_dtor()
750 zend_hash_destroy(compiler_globals->function_table); in compiler_globals_dtor()
751 free(compiler_globals->function_table); in compiler_globals_dtor()
753 if (compiler_globals->class_table != GLOBAL_CLASS_TABLE) { in compiler_globals_dtor()
755 zend_hash_graceful_reverse_destroy(compiler_globals->class_table); in compiler_globals_dtor()
756 free(compiler_globals->class_table); in compiler_globals_dtor()
758 if (compiler_globals->auto_globals != GLOBAL_AUTO_GLOBALS_TABLE) { in compiler_globals_dtor()
759 zend_hash_destroy(compiler_globals->auto_globals); in compiler_globals_dtor()
760 free(compiler_globals->auto_globals); in compiler_globals_dtor()
762 if (compiler_globals->script_encoding_list) { in compiler_globals_dtor()
763 pefree((char*)compiler_globals->script_encoding_list, 1); in compiler_globals_dtor()
765 if (compiler_globals->map_ptr_real_base) { in compiler_globals_dtor()
766 free(compiler_globals->map_ptr_real_base); in compiler_globals_dtor()
767 compiler_globals->map_ptr_real_base = NULL; in compiler_globals_dtor()
768 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(NULL); in compiler_globals_dtor()
769 compiler_globals->map_ptr_size = 0; in compiler_globals_dtor()
876 zend_compiler_globals *compiler_globals; in zend_startup() local
976 compiler_globals = ts_resource(compiler_globals_id); in zend_startup()
979 compiler_globals_dtor(compiler_globals); in zend_startup()
980 compiler_globals->in_compilation = 0; in zend_startup()
981 compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); in zend_startup()
982 compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); in zend_startup()
984 *compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE; in zend_startup()
985 *compiler_globals->class_table = *GLOBAL_CLASS_TABLE; in zend_startup()
986 compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE; in zend_startup()
1060 zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id); in zend_post_startup() local
1076 *GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table; in zend_post_startup()
1077 *GLOBAL_CLASS_TABLE = *compiler_globals->class_table; in zend_post_startup()
1079 global_map_ptr_last = compiler_globals->map_ptr_last; in zend_post_startup()
1085 free(compiler_globals->function_table); in zend_post_startup()
1086 compiler_globals->function_table = NULL; in zend_post_startup()
1087 free(compiler_globals->class_table); in zend_post_startup()
1088 compiler_globals->class_table = NULL; in zend_post_startup()
1089 if (compiler_globals->map_ptr_real_base) { in zend_post_startup()
1090 free(compiler_globals->map_ptr_real_base); in zend_post_startup()
1092 compiler_globals->map_ptr_real_base = NULL; in zend_post_startup()
1093 compiler_globals->map_ptr_base = ZEND_MAP_PTR_BIASED_BASE(NULL); in zend_post_startup()
1094 if ((script_encoding_list = (zend_encoding **)compiler_globals->script_encoding_list)) { in zend_post_startup()
1095 compiler_globals_ctor(compiler_globals); in zend_post_startup()
1096 compiler_globals->script_encoding_list = (const zend_encoding **)script_encoding_list; in zend_post_startup()
1098 compiler_globals_ctor(compiler_globals); in zend_post_startup()