Lines Matching refs:z
79 static void zend_persist_zval(zval *z);
80 static void zend_persist_zval_const(zval *z);
281 static void zend_persist_zval(zval *z) in zend_persist_zval() argument
286 switch (Z_TYPE_P(z)) { in zend_persist_zval()
289 flags = Z_GC_FLAGS_P(z) & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT); in zend_persist_zval()
290 zend_accel_store_interned_string(Z_STR_P(z)); in zend_persist_zval()
291 Z_GC_FLAGS_P(z) |= flags; in zend_persist_zval()
292 Z_TYPE_FLAGS_P(z) &= ~(IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE); in zend_persist_zval()
295 new_ptr = zend_shared_alloc_get_xlat_entry(Z_ARR_P(z)); in zend_persist_zval()
297 Z_ARR_P(z) = new_ptr; in zend_persist_zval()
298 Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE; in zend_persist_zval()
300 if (Z_IMMUTABLE_P(z)) { in zend_persist_zval()
301 Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array)); in zend_persist_zval()
302 zend_hash_persist_immutable(Z_ARRVAL_P(z)); in zend_persist_zval()
304 GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); in zend_persist_zval()
305 zend_accel_store(Z_ARR_P(z), sizeof(zend_array)); in zend_persist_zval()
306 zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval); in zend_persist_zval()
308 Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE; in zend_persist_zval()
309 GC_REFCOUNT(Z_COUNTED_P(z)) = 2; in zend_persist_zval()
310 GC_FLAGS(Z_COUNTED_P(z)) |= IS_ARRAY_IMMUTABLE; in zend_persist_zval()
311 Z_ARRVAL_P(z)->u.flags |= HASH_FLAG_STATIC_KEYS; in zend_persist_zval()
312 Z_ARRVAL_P(z)->u.flags &= ~HASH_FLAG_APPLY_PROTECTION; in zend_persist_zval()
317 new_ptr = zend_shared_alloc_get_xlat_entry(Z_REF_P(z)); in zend_persist_zval()
319 Z_REF_P(z) = new_ptr; in zend_persist_zval()
321 zend_accel_store(Z_REF_P(z), sizeof(zend_reference)); in zend_persist_zval()
322 zend_persist_zval(Z_REFVAL_P(z)); in zend_persist_zval()
326 new_ptr = zend_shared_alloc_get_xlat_entry(Z_AST_P(z)); in zend_persist_zval()
328 Z_AST_P(z) = new_ptr; in zend_persist_zval()
330 zend_accel_store(Z_AST_P(z), sizeof(zend_ast_ref)); in zend_persist_zval()
331 Z_ASTVAL_P(z) = zend_persist_ast(Z_ASTVAL_P(z)); in zend_persist_zval()
337 static void zend_persist_zval_static(zval *z) in zend_persist_zval_static() argument
342 switch (Z_TYPE_P(z)) { in zend_persist_zval_static()
345 flags = Z_GC_FLAGS_P(z) & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT); in zend_persist_zval_static()
346 zend_accel_store_interned_string(Z_STR_P(z)); in zend_persist_zval_static()
347 Z_GC_FLAGS_P(z) |= flags; in zend_persist_zval_static()
348 Z_TYPE_FLAGS_P(z) &= ~(IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE); in zend_persist_zval_static()
351 new_ptr = zend_shared_alloc_get_xlat_entry(Z_ARR_P(z)); in zend_persist_zval_static()
353 Z_ARR_P(z) = new_ptr; in zend_persist_zval_static()
354 Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE; in zend_persist_zval_static()
356 if (Z_IMMUTABLE_P(z)) { in zend_persist_zval_static()
357 Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array)); in zend_persist_zval_static()
358 zend_hash_persist_immutable(Z_ARRVAL_P(z)); in zend_persist_zval_static()
360 GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); in zend_persist_zval_static()
361 zend_accel_store(Z_ARR_P(z), sizeof(zend_array)); in zend_persist_zval_static()
362 zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval); in zend_persist_zval_static()
364 Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE; in zend_persist_zval_static()
365 GC_REFCOUNT(Z_COUNTED_P(z)) = 2; in zend_persist_zval_static()
366 GC_FLAGS(Z_COUNTED_P(z)) |= IS_ARRAY_IMMUTABLE; in zend_persist_zval_static()
367 Z_ARRVAL_P(z)->u.flags |= HASH_FLAG_STATIC_KEYS; in zend_persist_zval_static()
368 Z_ARRVAL_P(z)->u.flags &= ~HASH_FLAG_APPLY_PROTECTION; in zend_persist_zval_static()
373 new_ptr = zend_shared_alloc_get_xlat_entry(Z_REF_P(z)); in zend_persist_zval_static()
375 Z_REF_P(z) = new_ptr; in zend_persist_zval_static()
377 zend_accel_store(Z_REF_P(z), sizeof(zend_reference)); in zend_persist_zval_static()
378 zend_persist_zval(Z_REFVAL_P(z)); in zend_persist_zval_static()
382 new_ptr = zend_shared_alloc_get_xlat_entry(Z_AST_P(z)); in zend_persist_zval_static()
384 Z_AST_P(z) = new_ptr; in zend_persist_zval_static()
385 Z_TYPE_FLAGS_P(z) = IS_TYPE_CONSTANT | IS_TYPE_IMMUTABLE; in zend_persist_zval_static()
387 zend_accel_store(Z_AST_P(z), sizeof(zend_ast_ref)); in zend_persist_zval_static()
388 Z_ASTVAL_P(z) = zend_persist_ast(Z_ASTVAL_P(z)); in zend_persist_zval_static()
389 Z_TYPE_FLAGS_P(z) = IS_TYPE_CONSTANT | IS_TYPE_IMMUTABLE; in zend_persist_zval_static()
390 GC_REFCOUNT(Z_COUNTED_P(z)) = 2; in zend_persist_zval_static()
396 static void zend_persist_zval_const(zval *z) in zend_persist_zval_const() argument
401 switch (Z_TYPE_P(z)) { in zend_persist_zval_const()
404 flags = Z_GC_FLAGS_P(z) & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT); in zend_persist_zval_const()
405 zend_accel_memdup_interned_string(Z_STR_P(z)); in zend_persist_zval_const()
406 Z_GC_FLAGS_P(z) |= flags; in zend_persist_zval_const()
407 Z_TYPE_FLAGS_P(z) &= ~(IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE); in zend_persist_zval_const()
410 new_ptr = zend_shared_alloc_get_xlat_entry(Z_ARR_P(z)); in zend_persist_zval_const()
412 Z_ARR_P(z) = new_ptr; in zend_persist_zval_const()
413 Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE; in zend_persist_zval_const()
415 if (Z_IMMUTABLE_P(z)) { in zend_persist_zval_const()
416 Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array)); in zend_persist_zval_const()
417 zend_hash_persist_immutable(Z_ARRVAL_P(z)); in zend_persist_zval_const()
419 GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); in zend_persist_zval_const()
420 zend_accel_store(Z_ARR_P(z), sizeof(zend_array)); in zend_persist_zval_const()
421 zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval); in zend_persist_zval_const()
423 Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE; in zend_persist_zval_const()
424 GC_REFCOUNT(Z_COUNTED_P(z)) = 2; in zend_persist_zval_const()
425 GC_FLAGS(Z_COUNTED_P(z)) |= IS_ARRAY_IMMUTABLE; in zend_persist_zval_const()
426 Z_ARRVAL_P(z)->u.flags |= HASH_FLAG_STATIC_KEYS; in zend_persist_zval_const()
427 Z_ARRVAL_P(z)->u.flags &= ~HASH_FLAG_APPLY_PROTECTION; in zend_persist_zval_const()
432 new_ptr = zend_shared_alloc_get_xlat_entry(Z_REF_P(z)); in zend_persist_zval_const()
434 Z_REF_P(z) = new_ptr; in zend_persist_zval_const()
436 zend_accel_store(Z_REF_P(z), sizeof(zend_reference)); in zend_persist_zval_const()
437 zend_persist_zval(Z_REFVAL_P(z)); in zend_persist_zval_const()
441 new_ptr = zend_shared_alloc_get_xlat_entry(Z_AST_P(z)); in zend_persist_zval_const()
443 Z_AST_P(z) = new_ptr; in zend_persist_zval_const()
445 zend_accel_store(Z_AST_P(z), sizeof(zend_ast_ref)); in zend_persist_zval_const()
446 Z_ASTVAL_P(z) = zend_persist_ast(Z_ASTVAL_P(z)); in zend_persist_zval_const()