Lines Matching refs:script
118 ((char*)(ptr) <= (char*)script->size)
120 (((char*)(ptr) >= (char*)script->mem && (char*)(ptr) < (char*)script->mem + script->size) || \
125 (ptr) = (void*)((char*)(ptr) - (char*)script->mem); \
141 if (EXPECTED(script->corrupted)) { \
145 (ptr) = (void*)((char*)(ptr) - (char*)script->mem); \
152 (ptr) = (void*)zend_file_cache_unserialize_interned((zend_string*)(ptr), !script->corrupted); \
157 if (EXPECTED(!script->corrupted)) { \
173 zend_file_cache_serialize_hash(ht, script, info, buf, zend_file_cache_serialize_attribute); \
182 zend_file_cache_unserialize_hash(ht, script, buf, zend_file_cache_unserialize_attribute, NULL); \
223 zend_persistent_script *script,
228 zend_persistent_script *script,
232 zend_persistent_script *script,
236 zend_persistent_script *script,
295 zend_persistent_script *script, argument
316 func(&p->val, script, info, buf);
323 zend_persistent_script *script, argument
331 zend_file_cache_serialize_zval(&((zend_ast_zval*)ast)->val, script, info, buf);
339 zend_file_cache_serialize_ast(tmp, script, info, buf);
349 zend_file_cache_serialize_ast(tmp, script, info, buf);
356 zend_persistent_script *script, argument
373 zend_file_cache_serialize_hash(ht, script, info, buf, zend_file_cache_serialize_zval);
383 zend_file_cache_serialize_zval(&ref->val, script, info, buf);
393 zend_file_cache_serialize_ast(GC_AST(ast), script, info, buf);
404 zend_persistent_script *script, argument
420 zend_file_cache_serialize_zval(&attr->args[i].value, script, info, buf);
425 zend_type *type, zend_persistent_script *script, zend_file_cache_metainfo *info, void *buf) argument
435 zend_file_cache_serialize_type(list_type, script, info, buf);
449 zend_persistent_script *script, argument
465 zend_file_cache_serialize_hash(ht, script, info, buf, zend_file_cache_serialize_zval);
503 zend_file_cache_serialize_zval(p, script, info, buf);
591 zend_file_cache_serialize_type(&p->type, script, info, buf);
623 zend_persistent_script *script, argument
632 zend_file_cache_serialize_op_array(op_array, script, info, buf);
636 zend_persistent_script *script, argument
655 zend_file_cache_serialize_type(&prop->type, script, info, buf);
661 zend_persistent_script *script, argument
676 zend_file_cache_serialize_zval(&c->value, script, info, buf);
688 zend_persistent_script *script, argument
706 …zend_file_cache_serialize_hash(&ce->function_table, script, info, buf, zend_file_cache_serialize_f…
715 zend_file_cache_serialize_zval(p, script, info, buf);
728 zend_file_cache_serialize_zval(p, script, info, buf);
732 …zend_file_cache_serialize_hash(&ce->constants_table, script, info, buf, zend_file_cache_serialize_…
736 …zend_file_cache_serialize_hash(&ce->properties_info, script, info, buf, zend_file_cache_serialize_…
862 zend_persistent_script *script, zend_file_cache_metainfo *info, void *buf) argument
864 if (script->warnings) {
866 SERIALIZE_PTR(script->warnings);
867 warnings = script->warnings;
870 for (uint32_t i = 0; i < script->num_warnings; i++) {
881 static void zend_file_cache_serialize(zend_persistent_script *script, argument
889 info->mem_size = script->size;
891 info->script_offset = (char*)script - (char*)script->mem;
892 info->timestamp = script->timestamp;
894 memcpy(buf, script->mem, script->size);
897 SERIALIZE_STR(new_script->script.filename);
899 …zend_file_cache_serialize_hash(&new_script->script.class_table, script, info, buf, zend_file_cache…
900 …zend_file_cache_serialize_hash(&new_script->script.function_table, script, info, buf, zend_file_ca…
901 zend_file_cache_serialize_op_array(&new_script->script.main_op_array, script, info, buf);
963 int zend_file_cache_script_store(zend_persistent_script *script, int in_shm) argument
980 filename = zend_file_cache_get_bin_file_path(script->script.filename);
1005 mem = emalloc(script->size + 64);
1008 mem = buf = emalloc(script->size);
1015 script->corrupted = 1; /* used to check if script restored to SHM or process memory */
1017 zend_file_cache_serialize(script, &info, buf);
1019 script->corrupted = 0;
1023 info.checksum = zend_adler32(ADLER32_INIT, buf, script->size);
1031 __msan_unpoison(buf, script->size);
1038 vec[1].iov_len = script->size;
1042 if (writev(fd, vec, 3) != (ssize_t)(sizeof(info) + script->size + info.str_size)) {
1052 if (ZEND_LONG_MAX < (zend_long)(sizeof(info) + script->size + info.str_size) ||
1054 write(fd, buf, script->size) != script->size ||
1079 zend_persistent_script *script, argument
1104 func(&p->val, script, buf);
1111 zend_persistent_script *script, argument
1117 zend_file_cache_unserialize_zval(&((zend_ast_zval*)ast)->val, script, buf);
1123 zend_file_cache_unserialize_ast(list->child[i], script, buf);
1131 zend_file_cache_unserialize_ast(ast->child[i], script, buf);
1138 zend_persistent_script *script, argument
1156 script, buf, zend_file_cache_unserialize_zval, ZVAL_PTR_DTOR);
1165 zend_file_cache_unserialize_zval(&ref->val, script, buf);
1171 zend_file_cache_unserialize_ast(Z_ASTVAL_P(zv), script, buf);
1181 static void zend_file_cache_unserialize_attribute(zval *zv, zend_persistent_script *script, void *b… argument
1194 zend_file_cache_unserialize_zval(&attr->args[i].value, script, buf);
1199 zend_type *type, zend_persistent_script *script, void *buf) argument
1208 zend_file_cache_unserialize_type(list_type, script, buf);
1222 zend_persistent_script *script, argument
1237 script, buf, zend_file_cache_unserialize_zval, ZVAL_PTR_DTOR);
1250 if (script->corrupted) {
1284 zend_file_cache_unserialize_zval(p, script, buf);
1364 zend_file_cache_unserialize_type(&p->type, script, buf);
1395 zend_persistent_script *script, argument
1402 zend_file_cache_unserialize_op_array(op_array, script, buf);
1406 zend_persistent_script *script, argument
1423 zend_file_cache_unserialize_type(&prop->type, script, buf);
1429 zend_persistent_script *script, argument
1442 zend_file_cache_unserialize_zval(&c->value, script, buf);
1453 zend_persistent_script *script, argument
1470 script, buf, zend_file_cache_unserialize_func, ZEND_FUNCTION_DTOR);
1478 zend_file_cache_unserialize_zval(p, script, buf);
1488 zend_file_cache_unserialize_zval(p, script, buf);
1493 script, buf, zend_file_cache_unserialize_class_constant, NULL);
1498 script, buf, zend_file_cache_unserialize_prop_info, NULL);
1617 static void zend_file_cache_unserialize_warnings(zend_persistent_script *script, void *buf) argument
1619 if (script->warnings) {
1620 UNSERIALIZE_PTR(script->warnings);
1621 for (uint32_t i = 0; i < script->num_warnings; i++) {
1622 UNSERIALIZE_PTR(script->warnings[i]);
1623 UNSERIALIZE_STR(script->warnings[i]->error_filename);
1624 UNSERIALIZE_STR(script->warnings[i]->error_message);
1629 static void zend_file_cache_unserialize(zend_persistent_script *script, argument
1632 script->mem = buf;
1634 UNSERIALIZE_STR(script->script.filename);
1636 zend_file_cache_unserialize_hash(&script->script.class_table,
1637 script, buf, zend_file_cache_unserialize_class, ZEND_CLASS_DTOR);
1638 zend_file_cache_unserialize_hash(&script->script.function_table,
1639 script, buf, zend_file_cache_unserialize_func, ZEND_FUNCTION_DTOR);
1640 zend_file_cache_unserialize_op_array(&script->script.main_op_array, script, buf);
1641 zend_file_cache_unserialize_warnings(script, buf);
1643 UNSERIALIZE_PTR(script->arena_mem);
1651 zend_persistent_script *script; local
1760 script = (zend_persistent_script *)bucket->data;
1761 if (!script->corrupted) {
1765 return script;
1799 script = (zend_persistent_script*)((char*)buf + info.script_offset);
1800 script->corrupted = !cache_it; /* used to check if script restored to SHM or process memory */
1804 zend_file_cache_unserialize(script, buf);
1819 script->corrupted = 0;
1823 script->dynamic_members.checksum = zend_accel_script_checksum(script);
1824 script->dynamic_members.last_used = ZCG(request_time);
1826 …_accel_hash_update(&ZCSG(hash), ZSTR_VAL(script->script.filename), ZSTR_LEN(script->script.filenam…
1829 …r(ACCEL_LOG_INFO, "File cached script loaded into memory '%s'", ZSTR_VAL(script->script.filename));
1835 return script;