Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83507 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90120 invoked from network); 22 Feb 2015 23:35:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2015 23:35:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.169 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.217.169 mail-lb0-f169.google.com Received: from [209.85.217.169] ([209.85.217.169:34134] helo=mail-lb0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/5D-18531-6B76AE45 for ; Sun, 22 Feb 2015 18:35:18 -0500 Received: by lbdu14 with SMTP id u14so15399506lbd.1 for ; Sun, 22 Feb 2015 15:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=j8eVqmkUMOocPpJXNlkMdzhAU0muKnvQtZJOmF9tII4=; b=Z7ro6GyNygH10Skn027kjocFMskeJ+qDLtRrUQJ5d1NgVva0DKiGk85Be5D7d3kPhj 2nmc1hZvLund0Vel39H2ITjp8/M9zqabZYN13Mf+JRFDhlOqQaKQjNVwpfiUgcjSiVV3 5GA0MYFAGIp/5cWY+2sXZ9gBgBd1zNvAB5BpVHKk0XECZPsdbGuzA67bHblEhVqtT+1Z YrQvL1aF0XpbsLE6wU1wWLzprrcNE5oPnhuI9gz4LRazA1ZIFEexqX3TWZCrwC547gcs Bf/bVy2HNWU8O1a3lrhbTIkgua+BXloOu8D9668vwmVqeHthp3adIWzp18cCnlrSJ4Ex iyyw== MIME-Version: 1.0 X-Received: by 10.112.139.136 with SMTP id qy8mr7504837lbb.38.1424648114668; Sun, 22 Feb 2015 15:35:14 -0800 (PST) Received: by 10.25.43.9 with HTTP; Sun, 22 Feb 2015 15:35:14 -0800 (PST) In-Reply-To: <83921f861c3378dfc6ea34b6681f2edd@mail.gmail.com> References: <2e4694f9805ee81ea0b2c79eab06c2d6@mail.gmail.com> <83921f861c3378dfc6ea34b6681f2edd@mail.gmail.com> Date: Sun, 22 Feb 2015 18:35:14 -0500 Message-ID: To: Zeev Suraski Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] JIT (was RE: [PHP-DEV] Coercive Scalar Type Hints RFC) From: ircmaxell@gmail.com (Anthony Ferrara) Zeev, >> And note that this can only work with strict types since you can do the >> necessary type inference and reconstruction (both forward from a function >> call, and backwards before it). > > Please do explain how strict type hints help you do inference that you > couldn't do with dynamic type hints. Ultimately, your whole argument hinges > on that, but you mention it in parentheses almost as an afterthought. > I claim the opposite - you cannot infer ANYTHING from Strict STH that you > cannot infer from Coercive STH. Consequently, everything you've shown, down > to the C-optimized version of strict_foo() can be implemented in the exact > same way for very_lax_foo(). Being able to optimize away the value > containers is not unique to languages with strict type hints. It's done in > JavaScript JIT engines, and it was done in our JIT POC. I do here: http://news.php.net/php.internals/83504 I'll re-state the specific part in this mail: