Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21964 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86380 invoked by uid 1010); 20 Feb 2006 20:31:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86364 invoked from network); 20 Feb 2006 20:31:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2006 20:31:12 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:9908] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 01/F5-45151-6072AF34 for ; Mon, 20 Feb 2006 15:31:11 -0500 Received: (qmail 29441 invoked from network); 20 Feb 2006 20:30:58 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 20 Feb 2006 20:30:58 -0000 Message-ID: <7.0.1.0.2.20060220122342.044187f8@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Mon, 20 Feb 2006 12:31:02 -0800 To: Marcus Boerger ,internals@lists.php.net In-Reply-To: <1692386645.20060219115704@marcus-boerger.de> References: <1692386645.20060219115704@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Deprecation of functions From: andi@zend.com (Andi Gutmans) Just for the record I've been spending quite a bit of time, trying to see how we can lower the amount of branches within our opcodes. Although one if() doesn't make a big difference on its own, the large number of branches we have do make a difference. So before you say it's just an integer comparison or 0.1%, there is actually much more to it. Also, the more branches we will have over time, the harder to optimize. I wasn't against the deprecated feature but just stated that implementation wise, adding another branch should be thought about again. There are other ways of adding deprecated to functions, which would only slow down the deprecated functions and not all functions. That said, as the abstract patch truly solves a problem, and adding the deprecated one on top of that isn't any slower, I don't mind the patch. Marcus, as usual you send a patch for comment on the weekend, and commit before you give fair amount of time for review. Monday is a holiday here in the US, and generally speaking, giving 2-3 days is the right thing to do. I've asked you numerous time and I suggest you respect it in future (although I realize it was probably done on purpose). Andi At 02:57 AM 2/19/2006, Marcus Boerger wrote: >Hello internals, > > i just made up a tiny patch that allows us to deprecate functions. The >background is that in the past we changed to issue E_STRICT or E_NOTICE >for stuff we are going to change in later versions. This is right now not >easily possible when we change to replace a functions name. The usual way >to add the new name is to rename the function and add an alias with the old >name but for the deprecation message we would need to have the function >implementation twice so that one can issue the message. The patch now >allows us to specify a function flag on the alias. > >I checked an early version of the patch with Andi and he didn't like the >introduction of another if(). For the explicit calling handler i see no >problem in adding it since it is just an integer comparision which makes >out less than 0.1% of the zend_call_function() for the function-call >opcode i hid the check behind the abstract check. So there is no new >penalty. And actually i think the abstract check is neccessary for the >the other part also. So the patch found an error and doesn't come with any >additional penalty at all. > >Patch is available for both 5.1 and HEAD here: >http://php.net/~helly/php/ext/ze2/ze2-deprecated-20060219-5_1.diff.txt >http://php.net/~helly/php/ext/ze2/ze2-deprecated-20060219-HEAD.diff.txt > >Anyone against? > >Best regards, > Marcus > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php