Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82738 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77024 invoked from network); 15 Feb 2015 19:18:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2015 19:18:41 -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 209.85.220.173 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.173 mail-vc0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:42512] helo=mail-vc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/DA-06835-E01F0E45 for ; Sun, 15 Feb 2015 14:18:40 -0500 Received: by mail-vc0-f173.google.com with SMTP id hy4so9434112vcb.4 for ; Sun, 15 Feb 2015 11:18:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ez39yXrmbANNADfdMLNg+MxaWJZidJJHfzPaNcRnPxE=; b=B2Z3y4skmqkUlsD0g+NvKd4HXKm0HpCm4jy/byIB+W+c+gGvyFKiJ0FZJsUdQmCc3K Il7d6gAQvpuQVPHZgulHbFMsZYYfsAm83GeZidFpZs7BpJ3omWRVbIW0eiIdx6bJOFAX kxr98qL7iMn4iGX6uJyu27z6uMbzi/shShDGKQ42K9V3kpxDMhJy+xKYN5pU5rBwJrsq mjWJRn0j3rhu5zLMxEx1gkJdhU0iaWajHb0Vnx/GA553EKXurargEfw9kSicHHjkC7Cy r4RL7cvkg7m0nS2pyMZ9I/ZlmIM6EpBc8gWZN5gUFDMiqCMRi1WCtG/ELxWVnt3icWP4 cuOA== X-Gm-Message-State: ALoCoQmbyCCIP6uxhBcC5fF5tAmgH9ZZ8Mn1nqkHvicHX36nlcKpAGl5e64i2qaWrjZJYS7Mn0NeMasH8GFjNuCxaUGE3b3D1HmoCJIYouyJ1rV5xPdLvXD/u7QzxhwCshcaTASyFYO71pCATCH6yw1S4KOo7c0/vg== MIME-Version: 1.0 X-Received: by 10.221.18.136 with SMTP id qg8mr13879404vcb.27.1424027914815; Sun, 15 Feb 2015 11:18:34 -0800 (PST) Received: by 10.52.74.73 with HTTP; Sun, 15 Feb 2015 11:18:34 -0800 (PST) In-Reply-To: References: <93453174-E6A8-47C6-8AB6-A08858A7FC05@zend.com> Date: Sun, 15 Feb 2015 23:18:34 +0400 Message-ID: To: Nikita Popov Cc: Anthony Ferrara , Zeev Suraski , Andrea Faulds , Patrick ALLAERT , PHP Internals Content-Type: multipart/alternative; boundary=001a113399e603638c050f255679 Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: dmitry@zend.com (Dmitry Stogov) --001a113399e603638c050f255679 Content-Type: text/plain; charset=UTF-8 Currently we perform checks in RECV opcode handlers. Andrea's patch just adds a flag in zend_execute_data that tells what kind of checks should be performed in the function. With JIT it's difficult to generate any checks on call-site, because the actual function may by unknown at compile-time (and even may be changed on next request). Thanks. Dmitry. On Sun, Feb 15, 2015 at 9:50 PM, Nikita Popov wrote: > On Sun, Feb 15, 2015 at 7:43 PM, Dmitry Stogov wrote: > >> Hi Anthony, >> >> If you are working on JIT, you should understand that declare() switch to >> strict typing can't improve anything, because it works on caller side and >> in each function you now will have to generate code for both weak and >> strict checks. >> > > Why do these checks have to be generated in the function, instead of > performing checks/casts at the call-site? Naively I would assume this to > perform better, because you can make use of type-information around the > call-site to elide checks/casts. Or does this have adverse effects due to > larger code size or something like that? > > Nikita > --001a113399e603638c050f255679--