Lines Matching refs:persistent_script

40 …zend_persistent_script *persistent_script = (zend_persistent_script *) emalloc(sizeof(zend_persist…  in create_persistent_script()  local
41 memset(persistent_script, 0, sizeof(zend_persistent_script)); in create_persistent_script()
43 zend_hash_init(&persistent_script->script.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 0); in create_persistent_script()
48 zend_hash_init(&persistent_script->script.class_table, 0, NULL, ZEND_CLASS_DTOR, 0); in create_persistent_script()
50 return persistent_script; in create_persistent_script()
53 void free_persistent_script(zend_persistent_script *persistent_script, int destroy_elements) in free_persistent_script() argument
58 persistent_script->script.function_table.nNumUsed = 0; in free_persistent_script()
59 persistent_script->script.class_table.nNumUsed = 0; in free_persistent_script()
61 destroy_op_array(&persistent_script->script.main_op_array); in free_persistent_script()
64 zend_hash_destroy(&persistent_script->script.function_table); in free_persistent_script()
65 zend_hash_destroy(&persistent_script->script.class_table); in free_persistent_script()
67 if (persistent_script->script.filename) { in free_persistent_script()
68 zend_string_release_ex(persistent_script->script.filename, 0); in free_persistent_script()
71 if (persistent_script->warnings) { in free_persistent_script()
72 for (uint32_t i = 0; i < persistent_script->num_warnings; i++) { in free_persistent_script()
73 zend_error_info *info = persistent_script->warnings[i]; in free_persistent_script()
78 efree(persistent_script->warnings); in free_persistent_script()
81 zend_accel_free_delayed_early_binding_list(persistent_script); in free_persistent_script()
83 efree(persistent_script); in free_persistent_script()
261 void zend_accel_build_delayed_early_binding_list(zend_persistent_script *persistent_script) in zend_accel_build_delayed_early_binding_list() argument
263 zend_op_array *op_array = &persistent_script->script.main_op_array; in zend_accel_build_delayed_early_binding_list()
271 persistent_script->num_early_bindings++; in zend_accel_build_delayed_early_binding_list()
275 zend_early_binding *early_binding = persistent_script->early_bindings = in zend_accel_build_delayed_early_binding_list()
276 emalloc(sizeof(zend_early_binding) * persistent_script->num_early_bindings); in zend_accel_build_delayed_early_binding_list()
291 void zend_accel_finalize_delayed_early_binding_list(zend_persistent_script *persistent_script) in zend_accel_finalize_delayed_early_binding_list() argument
293 if (!persistent_script->num_early_bindings) { in zend_accel_finalize_delayed_early_binding_list()
297 zend_early_binding *early_binding = persistent_script->early_bindings; in zend_accel_finalize_delayed_early_binding_list()
298 zend_early_binding *early_binding_end = early_binding + persistent_script->num_early_bindings; in zend_accel_finalize_delayed_early_binding_list()
299 zend_op_array *op_array = &persistent_script->script.main_op_array; in zend_accel_finalize_delayed_early_binding_list()
322 void zend_accel_free_delayed_early_binding_list(zend_persistent_script *persistent_script) in zend_accel_free_delayed_early_binding_list() argument
324 if (persistent_script->num_early_bindings) { in zend_accel_free_delayed_early_binding_list()
325 for (uint32_t i = 0; i < persistent_script->num_early_bindings; i++) { in zend_accel_free_delayed_early_binding_list()
326 zend_early_binding *early_binding = &persistent_script->early_bindings[i]; in zend_accel_free_delayed_early_binding_list()
331 efree(persistent_script->early_bindings); in zend_accel_free_delayed_early_binding_list()
332 persistent_script->early_bindings = NULL; in zend_accel_free_delayed_early_binding_list()
333 persistent_script->num_early_bindings = 0; in zend_accel_free_delayed_early_binding_list()
338 zend_persistent_script *persistent_script, zend_op_array *op_array) in zend_accel_do_delayed_early_binding() argument
349 CG(compiled_filename) = persistent_script->script.filename; in zend_accel_do_delayed_early_binding()
351 for (uint32_t i = 0; i < persistent_script->num_early_bindings; i++) { in zend_accel_do_delayed_early_binding()
352 zend_early_binding *early_binding = &persistent_script->early_bindings[i]; in zend_accel_do_delayed_early_binding()
374 zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script, int from_shared_me… in zend_accel_load_script() argument
379 *op_array = persistent_script->script.main_op_array; in zend_accel_load_script()
387 if (persistent_script->compiler_halt_offset != 0 && in zend_accel_load_script()
388 persistent_script->script.filename) { in zend_accel_load_script()
392 …_name(haltoff, sizeof(haltoff) - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in zend_accel_load_script()
394 …zend_register_long_constant(ZSTR_VAL(name), ZSTR_LEN(name), persistent_script->compiler_halt_offse… in zend_accel_load_script()
400 if (zend_hash_num_elements(&persistent_script->script.function_table) > 0) { in zend_accel_load_script()
402 zend_accel_function_hash_copy(CG(function_table), &persistent_script->script.function_table); in zend_accel_load_script()
404 …zend_accel_function_hash_copy_notify(CG(function_table), &persistent_script->script.function_table… in zend_accel_load_script()
408 if (zend_hash_num_elements(&persistent_script->script.class_table) > 0) { in zend_accel_load_script()
410 zend_accel_class_hash_copy(CG(class_table), &persistent_script->script.class_table); in zend_accel_load_script()
412 zend_accel_class_hash_copy_notify(CG(class_table), &persistent_script->script.class_table); in zend_accel_load_script()
416 if (persistent_script->num_early_bindings) { in zend_accel_load_script()
417 zend_accel_do_delayed_early_binding(persistent_script, op_array); in zend_accel_load_script()
421 free_persistent_script(persistent_script, 0); /* free only hashes */ in zend_accel_load_script()
551 unsigned int zend_accel_script_checksum(zend_persistent_script *persistent_script) in zend_accel_script_checksum() argument
553 unsigned char *mem = (unsigned char*)persistent_script->mem; in zend_accel_script_checksum()
554 size_t size = persistent_script->size; in zend_accel_script_checksum()
555 …istent_script_check_block_size = ((char *)&(persistent_script->dynamic_members)) - (char *)persist… in zend_accel_script_checksum()
558 if (mem < (unsigned char*)persistent_script) { in zend_accel_script_checksum()
559 checksum = zend_adler32(checksum, mem, (unsigned char*)persistent_script - mem); in zend_accel_script_checksum()
560 size -= (unsigned char*)persistent_script - mem; in zend_accel_script_checksum()
561 mem += (unsigned char*)persistent_script - mem; in zend_accel_script_checksum()
565 mem += sizeof(*persistent_script); in zend_accel_script_checksum()
566 size -= sizeof(*persistent_script); in zend_accel_script_checksum()