Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32103 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63339 invoked by uid 1010); 7 Sep 2007 21:52:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 63324 invoked from network); 7 Sep 2007 21:52:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2007 21:52:59 -0000 Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:22222] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/33-44512-838C1E64 for ; Fri, 07 Sep 2007 17:52:58 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 7 Sep 2007 14:52:53 -0700 Message-ID: <698DE66518E7CA45812BD18E807866CEA2AB2C@us-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Patch for macros for tracking refcount and is_ref Thread-Index: AcfxglSGAGqq2v2vQk6+oHA0GY+qRwAFtksQ References: <849426349.20070904210047@marcus-boerger.de> <698DE66518E7CA45812BD18E807866CEA2A93C@us-ex1.zend.net> <7d5a202f0709070106r5cc0cbb0n2d58d6f8a4e1c9a3@mail.gmail.com> <698DE66518E7CA45812BD18E807866CEA2AAA3@us-ex1.zend.net> To: "David Wang" Cc: "Cristian Rodriguez" , Subject: RE: [PHP-DEV] Patch for macros for tracking refcount and is_ref From: andi@zend.com ("Andi Gutmans") As far as I'm concerned you can commit it with ZEND_GC. If you don't have karma let me know and we'll commit it. Thanks! Andi > -----Original Message----- > From: David Wang [mailto:planetbeing@gmail.com] > Sent: Friday, September 07, 2007 12:07 PM > To: Andi Gutmans > Cc: Cristian Rodriguez; internals@lists.php.net > Subject: Re: [PHP-DEV] Patch for macros for tracking refcount and > is_ref >=20 > Here's my analysis of what the options are: >=20 > In my mind, the macros patch is actually unrelated to the GC patch. It > is a Good Idea (tm) to use macros to manipulate refcounts no matter if > the GC is enabled, disabled, present in the source, or not added at > all. The only question is whether to break source compatibility just > for the sake of the aesthetics and cleanness of using macros to > manipulate refcounts. >=20 > If one accepts that PHP should and will use macros to manipulate > refcounts in the future no matter what happens, then it's only a > question of when to break source compatibility. The choice is either > right now, or (if the GC is added) when the GC is added, or (if the GC > is not added) at some undefined point in the future. >=20 > Breaking it now instead of later might save some more work in the > future, because new refcount manipulations might be added that will > also have to be changed later. However, breaking it now without adding > a new feature (GC) might seem rather arbitrary to developers of PECL > extensions. Breaking it when GC is added might be an easier pill to > swallow. >=20 > It's probably also true that the work saved if we break source > compatibility early is not extremely significant: Replacing two > "z->refcount++"s in your code is about as much work as just replacing > one. It may also be true that the addition of GC might require the > source of some extensions that do heavy refcount manipulation to be > looked at at that point anyway (don't worry! I think this is actually > VERY unlikely, but nevertheless possible) so it might be more > efficient to break source compatibility at the point where the GC is > officially added. >=20 > In consideration of those points, and in the interest of moving things > along I am in favor of going with the version with ZEND_GC, but > removing that option when the GC is integrated in some form or > another. Deferring the source compatibility break is not very > expensive in any case. >=20 > David