From: Nikita Popov Date: Thu, 8 Aug 2019 08:55:02 +0000 (+0200) Subject: Merge branch 'PHP-7.3' into PHP-7.4 X-Git-Tag: php-7.4.0beta4~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9dc94201101164ef5594047a7ab92bd4328a6f8;p=php Merge branch 'PHP-7.3' into PHP-7.4 --- d9dc94201101164ef5594047a7ab92bd4328a6f8 diff --cc Zend/zend_gc.c index be00bc73a6,8b9ee17632..19cfd0433c --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@@ -78,14 -78,30 +78,30 @@@ #endif /* GC_INFO layout */ -#define GC_ADDRESS 0x0fffff -#define GC_COLOR 0x300000 +#define GC_ADDRESS 0x0fffffu +#define GC_COLOR 0x300000u -#define GC_BLACK 0x000000 /* must be zero */ -#define GC_WHITE 0x100000 -#define GC_GREY 0x200000 -#define GC_PURPLE 0x300000 +#define GC_BLACK 0x000000u /* must be zero */ +#define GC_WHITE 0x100000u +#define GC_GREY 0x200000u +#define GC_PURPLE 0x300000u + /* Debug tracing */ + #if ZEND_GC_DEBUG > 1 + # define GC_TRACE(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__); + # define GC_TRACE_REF(ref, format, ...) \ + do { \ + gc_trace_ref((zend_refcounted *) ref); \ + fprintf(stderr, format "\n", ##__VA_ARGS__); \ + } while (0) + # define GC_TRACE_SET_COLOR(ref, color) \ + GC_TRACE_REF(ref, "->%s", gc_color_name(color)) + #else + # define GC_TRACE_REF(ref, format, ...) + # define GC_TRACE_SET_COLOR(ref, new_color) + # define GC_TRACE(str) + #endif + /* GC_INFO access */ #define GC_REF_ADDRESS(ref) \ (((GC_TYPE_INFO(ref)) & (GC_ADDRESS << GC_INFO_SHIFT)) >> GC_INFO_SHIFT)