Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43893 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1954 invoked from network); 12 May 2009 06:25:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2009 06:25:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:45391] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/1F-05302-F66190A4 for ; Tue, 12 May 2009 02:25:53 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id 25E1E504A3; Tue, 12 May 2009 10:23:13 +0300 (IDT) Received: from ws.home ([10.1.10.12]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 12 May 2009 09:25:52 +0300 Message-ID: <4A09166B.4090603@zend.com> Date: Tue, 12 May 2009 10:25:47 +0400 User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Paul Biggar CC: Guilherme Blanco , Marcus Boerger , Timm Friebe , internals@lists.php.net References: <155749706.20090117211737@marcus-boerger.de> <497872B8.60807@zend.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 May 2009 06:25:53.0030 (UTC) FILETIME=[800C8260:01C9D2CA] Subject: Re: [PHP-DEV] Method call improvements From: dmitry@zend.com (Dmitry Stogov) Hi Paul, Paul Biggar wrote: > On Mon, May 11, 2009 at 7:47 PM, Guilherme Blanco > wrote: >> What's the status on this one?! > > I think it died from neglect. But it was a really good idea. > > > One question that was raised was: > >> On Thu, Jan 22, 2009 at 10:20 AM, Dmitry Stogov wrote: >>> However we can introduce some indirect table associated with op_array, which >>> can be used to implement inline caches without direct opcode modification >>> (in the same way as IS_CV variables work). There are a lot of papers about >>> polymorphic inline caches (e.g. >>> http://research.sun.com/self/papers/pics.html) which we probably should use >>> to not to invite bicycle. > > You can't actually use PICs or even ICs with the Zend engine, because > you can't insert code into the callee method's header (you would need > a JIT). You also wouldn't want to, since PHP can't use the > recompilation techniques that Self had. You can use lookup caches, > which is exactly what the original patch was. I know PHP limitations, and I meant additional lookup caches for one or few results connected directly to ZEND_INIT_METHOD_CALL (and family) opcodes. > FWIW, since PHP has a static inheritence chain, the best approach > seems to be to build a virtual dispatch table, instead of a hashtable > for functions. However, there might be some esoteric extensions which > make this difficult. The real things is even worse as during compilation of a class it's parent class doesn't have to be known. So construction of VMTs becomes a bit problematic. BTW we could think in this way... Thanks. Dmitry. > > > Paul >