Lines Matching refs:script

1046 		if (persistent_script->script.filename != file_handle->opened_path &&  in do_validate_timestamps()
1047 !zend_string_equal_content(persistent_script->script.filename, file_handle->opened_path)) { in do_validate_timestamps()
1053 persistent_script->script.filename != full_path_ptr && in do_validate_timestamps()
1054 !zend_string_equal_content(persistent_script->script.filename, full_path_ptr)) { in do_validate_timestamps()
1081 zend_stream_init_filename(&ps_handle, ZSTR_VAL(persistent_script->script.filename)); in do_validate_timestamps()
1082 ps_handle.opened_path = persistent_script->script.filename; in do_validate_timestamps()
1395 new_persistent_script->is_phar = is_phar_file(new_persistent_script->script.filename); in store_script_in_file_cache()
1402 ZSTR_VAL(new_persistent_script->script.filename), in store_script_in_file_cache()
1421 …if (!zend_optimize_script(&new_persistent_script->script, ZCG(accel_directives).optimization_level… in cache_script_in_file_cache()
1441 …if (!zend_optimize_script(&new_persistent_script->script, ZCG(accel_directives).optimization_level… in cache_script_in_shared_memory()
1453 bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->script.filename); in cache_script_in_shared_memory()
1552 new_persistent_script->is_phar = is_phar_file(new_persistent_script->script.filename); in cache_script_in_shared_memory()
1559 ZSTR_VAL(new_persistent_script->script.filename), in cache_script_in_shared_memory()
1568 …te(&ZCSG(hash), ZSTR_VAL(new_persistent_script->script.filename), ZSTR_LEN(new_persistent_script-> in cache_script_in_shared_memory()
1570 …zend_accel_error(ACCEL_LOG_INFO, "Cached script '%s'", ZSTR_VAL(new_persistent_script->script.file… in cache_script_in_shared_memory()
1574 (ZSTR_LEN(new_persistent_script->script.filename) != key_length || in cache_script_in_shared_memory()
1575 memcmp(ZSTR_VAL(new_persistent_script->script.filename), key, key_length) != 0)) { in cache_script_in_shared_memory()
1677 static void replay_warnings(zend_persistent_script *script) { in replay_warnings() argument
1678 for (uint32_t i = 0; i < script->num_warnings; i++) { in replay_warnings()
1679 zend_recorded_warning *warning = script->warnings[i]; in replay_warnings()
1820 new_persistent_script->script.main_op_array = *op_array; in opcache_compile_file()
1821 …ction_table), CG(function_table)->nNumUsed - orig_functions_count, &new_persistent_script->script); in opcache_compile_file()
1822 …ses(CG(class_table), CG(class_table)->nNumUsed - orig_class_count, &new_persistent_script->script); in opcache_compile_file()
1823 new_persistent_script->script.first_early_binding_opline = in opcache_compile_file()
1851 new_persistent_script->script.filename = zend_string_copy(file_handle->opened_path); in opcache_compile_file()
1853 …new_persistent_script->script.filename = zend_string_init(file_handle->filename, strlen(file_handl… in opcache_compile_file()
1855 zend_string_hash_val(new_persistent_script->script.filename); in opcache_compile_file()
1893 if (persistent_script->script.filename) { in file_cache_compile_file()
1900 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in file_cache_compile_file()
1904 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in file_cache_compile_file()
1907 …izeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persistent_script->sc… in file_cache_compile_file()
1939 if ((ZSTR_LEN(persistent_script->script.filename)<sizeof("phar://.phar")) || in check_persistent_script_access()
1940 memcmp(ZSTR_VAL(persistent_script->script.filename), "phar://", sizeof("phar://")-1)) { in check_persistent_script_access()
1942 return access(ZSTR_VAL(persistent_script->script.filename), R_OK) != 0; in check_persistent_script_access()
1946 phar_path = estrdup(ZSTR_VAL(persistent_script->script.filename)+sizeof("phar://")-1); in check_persistent_script_access()
2128 …ZSTR_VAL(persistent_script->script.filename), persistent_script->dynamic_members.checksum, checksu… in persistent_compile_file()
2216 if (persistent_script->script.filename) { in persistent_compile_file()
2224 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in persistent_compile_file()
2228 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in persistent_compile_file()
2231 …izeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persistent_script->sc… in persistent_compile_file()
2291 handle->opened_path = zend_string_copy(ZCG(cache_persistent_script)->script.filename); in persistent_stream_open_function()
2331 return zend_string_copy(persistent_script->script.filename); in persistent_zend_resolve_path()
3311 …date(&ZCSG(hash), ZSTR_VAL(ZCSG(preload_script)->script.filename), ZSTR_LEN(ZCSG(preload_script)->
3315 …zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL((*p)->script.filename), ZSTR_LEN((*p)->script.filenam…
3416 zend_persistent_script *script; local
3418 script = create_persistent_script();
3419 script->script.first_early_binding_opline = (uint32_t)-1;
3420 script->script.filename = zend_string_copy(op_array->filename);
3421 zend_string_hash_val(script->script.filename);
3422 script->script.main_op_array = *op_array;
3432 zend_hash_add_ptr(preload_scripts, script->script.filename, script);
3756 zend_persistent_script *script; local
3931 script = zend_hash_find_ptr(preload_scripts, ce->info.user.filename);
3932 ZEND_ASSERT(script);
3933 zend_hash_add(&script->script.class_table, key, zv);
3942 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
3943 zend_op_array *op_array = &script->script.main_op_array;
3952 if (!zend_hash_exists(&script->script.class_table, key)) {
3961 script->script.first_early_binding_opline = zend_build_delayed_early_binding_list(op_array);
3962 if (script->script.first_early_binding_opline == (uint32_t)-1) {
4061 zend_persistent_script *script; local
4065 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4066 script->empty = 1;
4072 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4073 if (script->empty) {
4075 zend_op *opline = script->script.main_op_array.opcodes;
4076 zend_op *end = opline + script->script.main_op_array.last;
4107 script->empty = 0;
4115 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4116 zend_op *opline = script->script.main_op_array.opcodes;
4117 zend_op *end = opline + script->script.main_op_array.last;
4180 static int preload_optimize(zend_persistent_script *script) argument
4187 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4194 ZEND_HASH_FOREACH_PTR(&tmp_script->script.class_table, ce) {
4201 …if (!zend_optimize_script(&script->script, ZCG(accel_directives).optimization_level, ZCG(accel_dir…
4205 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4209 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4210 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4217 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4218 …if (!zend_optimize_script(&script->script, ZCG(accel_directives).optimization_level, ZCG(accel_dir…
4293 new_persistent_script->is_phar = is_phar_file(new_persistent_script->script.filename);
4300 ZSTR_VAL(new_persistent_script->script.filename),
4309 …te(&ZCSG(hash), ZSTR_VAL(new_persistent_script->script.filename), ZSTR_LEN(new_persistent_script->
4311 …zend_accel_error(ACCEL_LOG_INFO, "Cached script '%s'", ZSTR_VAL(new_persistent_script->script.file…
4324 zend_script *script = &ZCSG(preload_script)->script; local
4325 if (zend_hash_num_elements(&script->function_table)) {
4326 Bucket *p = script->function_table.arData;
4327 Bucket *end = p + script->function_table.nNumUsed;
4330 CG(function_table)->nNumUsed + script->function_table.nNumUsed, 0);
4336 if (zend_hash_num_elements(&script->class_table)) {
4337 Bucket *p = script->class_table.arData;
4338 Bucket *end = p + script->class_table.nNumUsed;
4341 CG(class_table)->nNumUsed + script->class_table.nNumUsed, 0);
4519 zend_persistent_script *script; local
4646 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4652 fake_execute_data.func = (zend_function*)&script->script.main_op_array;
4655 script->compiler_halt_offset = Z_LVAL_P(offset);
4670 script = create_persistent_script();
4671 script->ping_auto_globals_mask = ping_auto_globals_mask;
4676 init_op_array(&script->script.main_op_array, ZEND_USER_FUNCTION, 1);
4678 init_op_array(&script->script.main_op_array, ZEND_USER_FUNCTION, 2);
4680 script->script.main_op_array.fn_flags |= ZEND_ACC_DONE_PASS_TWO;
4681 script->script.main_op_array.last = 1;
4682 script->script.main_op_array.last_literal = 1;
4684 script->script.main_op_array.literals = (zval*)emalloc(sizeof(zval));
4686 script->script.main_op_array.literals = (zval*)(script->script.main_op_array.opcodes + 1);
4688 ZVAL_NULL(script->script.main_op_array.literals);
4689 memset(script->script.main_op_array.opcodes, 0, sizeof(zend_op));
4690 script->script.main_op_array.opcodes[0].opcode = ZEND_RETURN;
4691 script->script.main_op_array.opcodes[0].op1_type = IS_CONST;
4692 script->script.main_op_array.opcodes[0].op1.constant = 0;
4693 …ZEND_PASS_TWO_UPDATE_CONSTANT(&script->script.main_op_array, script->script.main_op_array.opcodes,…
4694 zend_vm_set_opcode_handler(script->script.main_op_array.opcodes);
4696 script->script.filename = CG(compiled_filename);
4699 script->script.first_early_binding_opline = (uint32_t)-1;
4701 preload_move_user_functions(CG(function_table), &script->script.function_table);
4702 preload_move_user_classes(CG(class_table), &script->script.class_table);
4704 zend_hash_sort_ex(&script->script.class_table, preload_sort_classes, NULL, 0);
4706 if (preload_optimize(script) != SUCCESS) {
4717 ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4729 ZCSG(preload_script) = preload_script_in_shared_memory(script);
4744 ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4745 if (zend_hash_num_elements(&script->script.class_table) > 1) {
4746 zend_hash_sort_ex(&script->script.class_table, preload_sort_classes, NULL, 0);
4748 ZCSG(saved_scripts)[i++] = preload_script_in_shared_memory(script);