Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94984 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47607 invoked from network); 10 Aug 2016 02:35:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Aug 2016 02:35:36 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:36045] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/0B-03404-6F29AA75 for ; Tue, 09 Aug 2016 22:35:35 -0400 Received: by mail-pa0-f52.google.com with SMTP id pp5so10822774pac.3 for ; Tue, 09 Aug 2016 19:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cxjU1gWdI7LEls5RTf81L/ApVjoRveQCURj3Go9IINY=; b=Fl5cp5l7XX+v5KhzU0we2XtdFgaT1rrZ+4ASIg+ybrJrVxuV+infJZiBq/S7xKwwW1 FS3hN+sOmcCLFwxZAxZGH8koUxqPRaJR5M0DRrE2GLCNWaZBM+Afrk09LSgokq6lab/2 ZFbFeseNRUteBfEP+N5XEj2Yz74utC5m968nUbMLQm9/ZEbrjZeS1uOIHKhTqR7uKocf dcYb45168OCYSYPgSTAXgAAaGL4eLAFMWC3on0DkKL7V6vzF20VMTI2l/oUqJtHHgRxz UVNkD3E02td4WTBKKts8JEvZOlKP7auwAk4St4D3N9uklVnqFCXKtPIEZrmFQsC2a+HR bXow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cxjU1gWdI7LEls5RTf81L/ApVjoRveQCURj3Go9IINY=; b=fd8rSLWngBICajXphjDYf8WAixY6GJ8/sj72fu9uSp+wZDjoil7LX6N67bHZTFXb3U MZFJk5TF/AuflSSCN/hCC45+8Hk6MSOUEssSCi8HJnWaZy2sfXMB2tThRZh2qdCJNAD4 0+jvMO0d2DvJdCLHnTjldamcQpREn/efvEaIGB1G31cbSz8Vdth7Xn3I0ZQXs4jivP13 oVbcrnOthgDaySX3gCtruXBpNnbmTFDs+aeI9RVGW64rRaU3sKaT4M8Qsw1STWZrt269 q9IE6RnzKyaFmkMnrVvyBhD9KfRnXhBcxwPgGR5SD73aLhOxfchPzEfXqnzC0ncvFePx MxrA== X-Gm-Message-State: AEkoouvd0kFPjtw7uWAHFtypgDCFwOosVgqBgy5v6t9VxBv9Y5oCyq6AmCz6QR/SpuxLmBUaFgFa1od8SYuZDA== X-Received: by 10.66.14.161 with SMTP id q1mr2775303pac.103.1470796531706; Tue, 09 Aug 2016 19:35:31 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.24.42 with HTTP; Tue, 9 Aug 2016 19:35:31 -0700 (PDT) In-Reply-To: References: Date: Tue, 9 Aug 2016 20:35:31 -0600 X-Google-Sender-Auth: BqEehR0rFp7VqBTrwUCEZOV7GDA Message-ID: To: Andrea Faulds Cc: internals Content-Type: multipart/alternative; boundary=bcaec51f9709cf31120539ae80d7 Subject: Re: [PHP-DEV] Re: The death of `#ifndef FAST_ZPP`? From: levim@php.net (Levi Morrison) --bcaec51f9709cf31120539ae80d7 Content-Type: text/plain; charset=UTF-8 On Tue, Aug 9, 2016 at 8:23 PM, Andrea Faulds wrote: > Hi everyone, > > 3 months and 6 days on, nobody has responded to this. > > Will these chunks of dead code ever be removed? > > Thanks! > > > Andrea Faulds wrote: > >> Hi everyone, >> >> You may recall that PHP 7.0 introduced a new API for processing >> arguments to internal functions, the "Fast Parameter Parsing API" or >> FAST_ZPP (https://wiki.php.net/rfc/fast_zpp), which is an alternative to >> the existing zend_parse_parameters function family. >> >> Since FAST_ZPP was implemented, many functions in built-in PHP >> extensions look like this: >> >> #ifndef FAST_ZPP >> if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S", &str, &what) == >> FAILURE) { >> return; >> } >> #else >> ZEND_PARSE_PARAMETERS_START(1, 2) >> Z_PARAM_STR(str) >> Z_PARAM_OPTIONAL >> Z_PARAM_STR(what) >> ZEND_PARSE_PARAMETERS_END(); >> #endif >> >> That is, they have /two/ sets of parameter processing code: one using >> the old API, and one using the new API, with conditional compilation. >> This is necessary because it is still possible to turn off FAST_ZPP by >> changing the value of the macro. >> >> However, should that be the case? The FAST_ZPP RFC was approved and PHP >> 7.0 was released containing it enabled by default, so it's no longer >> just an experimental performance enhancement. Furthermore, I have no >> reason to believe that the option to turn off FAST_ZPP is actually used >> in practice, though feel free to prove me wrong! >> >> Requiring all usages of FAST_ZPP to be accompanied by a >> zend_parse_parameters() fallback creates code bloat. It also creates >> hidden, potentially build-breaking bugs, because the code is rarely >> built with FAST_ZPP disabled. It's like the old TSRMLS_CC situation. >> >> Furthermore, for those who would prefer the FAST_ZPP API, it is >> inconvenient that they cannot use it exclusively and must also use >> zend_parse_parameters(), doubling the effort. >> >> So, I would like to ask: would there be any objections to going through >> and removing all unnecessary zend_parse_parameters fallbacks, and making >> it impossible to disable FAST_ZPP? This would make the two APIs equally >> valid. >> >> Thanks! >> >> > > -- > Andrea Faulds > https://ajf.me/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > No objection from me. --bcaec51f9709cf31120539ae80d7--