Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32036 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37432 invoked by uid 1010); 4 Sep 2007 15:26:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37417 invoked from network); 4 Sep 2007 15:26:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2007 15:26:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=nlopess@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=nlopess@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.55.154.21 as permitted sender) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.21 relay1.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.21] ([212.55.154.21:53403] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/38-21414-8197DD64 for ; Tue, 04 Sep 2007 11:26:17 -0400 Received: (qmail 32698 invoked from network); 4 Sep 2007 15:26:13 -0000 Received: from unknown (HELO http13) (10.134.35.198) by relay1 with SMTP; 4 Sep 2007 15:26:13 -0000 Received: (qmail 3048 invoked by uid 64140); 4 Sep 2007 15:26:13 -0000 Received: from bl7-48-52.dsl.telepac.pt (bl7-48-52.dsl.telepac.pt [85.240.48.52]) by w13.mail.sapo.pt (Horde MIME library) with HTTP; Tue, 04 Sep 2007 16:26:13 +0100 Message-ID: <20070904162613.4qgfdddo7scw8o8w@w13.mail.sapo.pt> Date: Tue, 04 Sep 2007 16:26:13 +0100 To: David Wang Cc: internals@lists.php.net, andi@php.net, dmitry@php.net References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2-cvs) X-Originating-IP: 85.240.48.52 X-PTMail-Version: 3.1.5 Subject: Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref From: nlopess@php.net (Nuno Lopes) I think this is a pretty good idea. It can also have some use if we =20 decide to investigate the usage of an off-the-shelf (conservative) =20 garbage collector such as Boehm's (maybe in next year's SoC). About the patch, the zval_*_p() functions don't really need to exist.. =20 they can be macros as well. (and the online keyword is also handled by =20 the Zend engine) Nuno > Hi, > > This is another shot at a patch to manage refcount and is_ref of zvals > with macros. The macros are implemented with inline functions that are > forcibly inlined (so they will behave the same as macros). This will > make it possible to put multiple statements in each macro later on for > garbage collection purposes. > > One thing to note is that I removed the existing ZVAL_ADDREF and > ZVAL_DELREF in favor of Z_ADDREF_P and Z_DELREF_P that do the same > thing. The original duo acted on zval pointers contrary to standard > form for macro names. > > The patch is probably too large to fit as an attachment, so here's a URL: > > http://zoo.cs.yale.edu/~yw226/macros.diff.txt > > Comments?