Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86790 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54634 invoked from network); 22 Jun 2015 19:10:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2015 19:10:08 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.192.41 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.41 mail-qg0-f41.google.com Received: from [209.85.192.41] ([209.85.192.41:33200] helo=mail-qg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/06-07834-D8D58855 for ; Mon, 22 Jun 2015 15:10:08 -0400 Received: by qged89 with SMTP id d89so56148006qge.0 for ; Mon, 22 Jun 2015 12:10:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=wdWzmQjga+3uZoMAV9gjV2PfRI2sF01N8xizf2W3YyE=; b=VI8sGWrnvg/plsoAm6EJBh/qD+DOu7SwaB7N/74JvNcL4q9aeLjxoozhPs2nKs9Fph 3DKI6R9aAxsKwfl0PRrPl+owEluj2oyZg8owQ48Ii3cWG21XhaCoWPxMxYQd14nDE4UI TiLU9hMe8V/SWheJgdFWdMSCmwMfSNNoZpSXhpHfsoznqN0kVFqpTDbBBgDZwY4M4n/O V9Ddy9aRtAF794XQMuNvRS/oKMv4C8GXxBTXnhisIUvpydVLEc9/8veOcZwjIuLsr7b7 umwkFvAS4k+ViJc+w8HilmK021FyNGhSULaMDQVd6RPi6SVyezKuGwDLoqEU9bdiqWzA nBBg== X-Gm-Message-State: ALoCoQmJxehP7NOzVB4TTSvRyWYB/OBpgq5dmcyQbO+ofKZwncKSuGYR/jFByvhpJQ1LaBYz+IMb X-Received: by 10.140.133.9 with SMTP id 9mr41035451qhf.5.1435000202983; Mon, 22 Jun 2015 12:10:02 -0700 (PDT) Received: from [10.252.9.177] ([64.124.192.210]) by mx.google.com with ESMTPSA id p75sm252563qgp.6.2015.06.22.12.10.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2015 12:10:00 -0700 (PDT) Message-ID: <55885D88.8060902@lerdorf.com> Date: Mon, 22 Jun 2015 15:10:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Dmitry Stogov CC: Bob Weinand , Anatol Belski , Kalle Sommer Nielsen , Stanislav Malyshev , Nikita Popov , PHP internals References: <5586E5D1.4010901@lerdorf.com> <55870947.4060304@lerdorf.com> <5587334C.2080401@lerdorf.com> <55873676.6050706@gmail.com> <55876B29.90804@lerdorf.com> <55881A72.4090403@lerdorf.com> <5588477E.7050109@lerdorf.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kGamktHrPO3KLhKtsGDvK1pQSFjejcV2d" Subject: Re: [PHP-DEV] hasType() for internal function parameters? From: rasmus@lerdorf.com (Rasmus Lerdorf) --kGamktHrPO3KLhKtsGDvK1pQSFjejcV2d Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/22/2015 03:00 PM, Dmitry Stogov wrote: >=20 >=20 > On Mon, Jun 22, 2015 at 8:35 PM, Rasmus Lerdorf > wrote: >=20 > On 06/22/2015 01:27 PM, Dmitry Stogov wrote: > > Actually, when you added type hints, php compiler stopped optimiz= ing and > > using ZEND_DEFINED (and others) instead of internal function call= s, but > > of course this shouldn't change behavior. I'll need to take a loo= k into > > difference. >=20 > Right, behaviour shouldn't change, but couldn't we also make it so = that > arginfo for internal calls is only used by reflection? We can do al= l the > type checking we need right in ZPP as we do now. Let's just ignore > arginfo entirely for these calls. >=20 >=20 > In general, we can, if we remove corresponding code in zend_vm_def.h, > and also some checks for ZEND_HAS_TYPE_INFO and internal functions in > zend_compile.c. I think that is the way to go. We didn't have any type info there before so we are not losing any functionality, and obviously adding it produces weird side effects and slows things down. Plus we should get a very small performance increase by removing the type info check entirely. -Rasmus --kGamktHrPO3KLhKtsGDvK1pQSFjejcV2d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlWIXYgACgkQlxayKTuqOuDrnwCeL8twnSPQlcH4+PVlU0Ydv4Ry lsMAnjGOqnMqXJwzgQfgTG/854B5vUg1 =Rxh6 -----END PGP SIGNATURE----- --kGamktHrPO3KLhKtsGDvK1pQSFjejcV2d--