Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43895 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21229 invoked from network); 12 May 2009 08:24:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2009 08:24:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.44.28 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 74.125.44.28 yx-out-2324.google.com Received: from [74.125.44.28] ([74.125.44.28:15455] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/31-05302-052390A4 for ; Tue, 12 May 2009 04:24:49 -0400 Received: by yx-out-2324.google.com with SMTP id 8so1934393yxg.83 for ; Tue, 12 May 2009 01:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=I2dkZrGOSVWUCj/5POYt2F6llKPVne++AVnlRjtZ1Kw=; b=LIi/e6a80Jffletocry71Wlrjhj/tEcdhfsVct3oJlKf7JpNFCNlQnHB3VxzwWJIE1 RtzLwFO9JchUJ5cPsRouTrnoJJnwrHOQsVXfNFRj1Y07XneZeFB2ZD7y60rdKbLhYb5l CiC56JB5MBEquh0pyo1bUeHIBLEl87CJOtIow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=uqLly0F5ZW8wVXnsa11HO0CmP0WCKnOP6tgtHmVFaImzpmuXwau1D13a+BVKvNSnzv 6tYd0loxq2wfAm96P4XLto2MhdF+dibHvMLdvFvGfO+s7jCTD7h2zAXB3TO/KJtf0hnh RVJGTP1Crv/U2XH9iWVZiosvDOBUavCIi/0Zs= MIME-Version: 1.0 Received: by 10.231.14.68 with SMTP id f4mr1404694iba.5.1242116686142; Tue, 12 May 2009 01:24:46 -0700 (PDT) In-Reply-To: <4A08CA5F.7010200@zend.com> References: <155749706.20090117211737@marcus-boerger.de> <497872B8.60807@zend.com> <4A08CA5F.7010200@zend.com> Date: Tue, 12 May 2009 09:24:26 +0100 Message-ID: To: Stanislav Malyshev Cc: Guilherme Blanco , Dmitry Stogov , Marcus Boerger , Timm Friebe , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Method call improvements From: paul.biggar@gmail.com (Paul Biggar) Hi Stas, Dmitry, On Tue, May 12, 2009 at 2:01 AM, Stanislav Malyshev wrote: > IHMO it's not static enough. I.e., since PHP is not compiled, we can not > =C2=A0create VD table for the class until runtime inheritance, which mean= s that > the code using this class can use method resolution more efficient than > name->function, i.e. hashtable. These lookups can be cached (i.e. CV styl= e) > but I don't see how they can be altogether prevented. On Tue, May 12, 2009 at 7:25 AM, Dmitry Stogov wrote: > The real things is even worse as during compilation of a class it's paren= t > class doesn't have to be known. So construction of VMTs becomes a bit > problematic. BTW we could think in this way... Apologies, I'm not familiar with run-time inheritence in PHP. My understanding was that when a classes source code is compiled, its parent classes must be known. When is this not the case? Must it be known for the class' first instantiation? In the worst case, it _might_ be cheaper to build it at instantiation time, but I would have to look up how expensive that is in a more static language to be sure. Certainly, it is currently so expensive that almost anything else would be better (including the OP's patch). Thanks, Paul --=20 Paul Biggar paul.biggar@gmail.com