Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41159 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37934 invoked from network); 16 Oct 2008 18:07:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2008 18:07:45 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:35426] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/FC-12818-FE287F84 for ; Thu, 16 Oct 2008 14:07:44 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id EA2FD414400F; Thu, 16 Oct 2008 18:09:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cpFENLRsqSB0; Thu, 16 Oct 2008 20:09:17 +0200 (CEST) Received: from [192.168.0.151] (77-58-144-136.dclient.hispeed.ch [77.58.144.136]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 2E7CD4144009; Thu, 16 Oct 2008 20:09:14 +0200 (CEST) Cc: Timm Friebe , Marcus Boerger , internals@lists.php.net, =?ISO-8859-1?Q?Johannes_Schl=FCter?= Message-ID: <5D4A905B-E361-409B-BD9E-E816482EDB8C@pooteeweet.org> To: Stanislav Malyshev In-Reply-To: <48EFC1E8.5030702@zend.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 16 Oct 2008 20:07:01 +0200 References: <01d401c8fe5e$6bc9d730$16b2a8c0@kartofel> <022101c8fe5f$4a3e3c40$16b2a8c0@kartofel> <1901158190.20080815120657@marcus-boerger.de> <7EB12BC1-41F1-458C-8017-9AB4D910CAA5@pooteeweet.org> <48EFC1E8.5030702@zend.com> X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] __getStatic From: mls@pooteeweet.org (Lukas Kahwe Smith) On 10.10.2008, at 22:58, Stanislav Malyshev wrote: > Hi! > >>> I've updated the patch and added some tests with it. >>> >>> http://sitten-polizei.de/php/getstatic.diff > > Looked at the patch. There's some things I noticed there: > 1. _getstatic->common.fn_flags |= ~ZEND_ACC_ALLOW_STATIC; > What was the idea here? Maybe ~ is not intended? > > 2. Do we really need ZEND_ASSIGN_CLASS opcode, can't we reuse > ASSIGN_OBJ with flag, as we do for fetches? > > 3. In zend_std_set_static_property, I'm not sure we need to do > zend_update_class_constants there. We won't be using any values from > it. > > 4. In zend_std_set_static_property, why you create new property_info > two times when property does not exist? > > 5. In zend_std_set_static_property, old value of the property is not > destroyed. Also, I'm not sure separation is handled there correctly > - previous value may be shared between variables, and just replacing > it would affect all shared variables. You may see how property > handler does assignments. > Alternatively, in the absence of the setter, you may just use the > existing assignment handler, just fetching the zval** as before and > passing it to zend_assign_to_variable. This would probably be better > - less stuff to do. > > 6. What would happen with foo::$bar += 1? I don't see assign-ops > handled anywhere in the patch. > > 7. Does zend_std_get_static_property handle the case of return by- > ref like property one does? > hmm .. i also emailed Timm a few weeks ago and got no reaction. the question now is .. does someone else care enough to work through the issues Stas has noted to get things in shape to be committed? regards, Lukas Kahwe Smith mls@pooteeweet.org