Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87713 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89785 invoked from network); 11 Aug 2015 19:03:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2015 19:03:01 -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.213.170 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:33149] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/D3-00789-2E64AC55 for ; Tue, 11 Aug 2015 15:03:00 -0400 Received: by igbpg9 with SMTP id pg9so97485623igb.0 for ; Tue, 11 Aug 2015 12:02:55 -0700 (PDT) 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=n5tX1cATPLogqzqyvwjVWBeywg4KuZotfXwRFl7BBBg=; b=Zbt4wSK70lgEkr1HHabJA+yrqqowLPil1Wuzml5YCIgeT3qzIvCiOH6+h+lrPzhLVI kN/qR6aMACaKVoLFPWiUg0Ygr9PrnUizP19EcZGp332fGE4hpyYPg+FnkURlT4foUDH6 YDlsqrrffnC/X+v9y8ZWI3naevWeqPIfMb5NwhZ3cDCz89j0Qns3cLqQRYkMte1iB43m bWBHzuFHejDJ/sxPaOXoo6em6AlJ/2y2jeRx2rbcJsN/OFHT8PCcD72E4MjvVB4XEZbL eQNXKhm/tSbnSeRPiSYLH1aw/j4HOUe1xm/NJ3COzFTkqSFvrsqheNYceqKD9enKq4qN So6A== X-Gm-Message-State: ALoCoQmfaFe/BBPwG7RixHzlZa5pf3MVZOIyOrtYT848sy0WeRyDoqSRQ9nvsyBUECOfvN3Ifhc9j5xLaSCHFUS1qljl6/wKU4YS5jSgToffqvhXfsvTuf3UFs1vfmsu8HaBr3ZrT+iWCRhwF/tFUCObfyEPggcSuARxIHtBr9KdKfq/brxPgow= MIME-Version: 1.0 X-Received: by 10.50.6.16 with SMTP id w16mr15310210igw.74.1439319774995; Tue, 11 Aug 2015 12:02:54 -0700 (PDT) Received: by 10.50.35.101 with HTTP; Tue, 11 Aug 2015 12:02:54 -0700 (PDT) In-Reply-To: <8BE12FDCDC5C457282790368866BD61E@pc1> References: <8BE12FDCDC5C457282790368866BD61E@pc1> Date: Tue, 11 Aug 2015 22:02:54 +0300 Message-ID: To: Matt Wilmas Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7ba97972e848eb051d0dbf36 Subject: Re: [PHP-DEV] Parameter parsing for zval type? From: dmitry@zend.com (Dmitry Stogov) --047d7ba97972e848eb051d0dbf36 Content-Type: text/plain; charset=UTF-8 Hi Matt, On Tue, Aug 11, 2015 at 9:00 PM, Matt Wilmas wrote: > Hi again, > > ----- Original Message ----- > From: "Matt Wilmas" > Sent: Tuesday, August 11, 2015 > > Hi Dmitry, all, >> >> Help me understand this. :-) It's been more puzzling to me recently >> since just coming to the part of optimizing traditional ZPP (sharing part >> with FAST_ZPP...). >> >> With the FAST_ZPP inline macros, why is there a Z_PARAM_ZVAL and >> Z_PARAM_ZVAL_DEREF? It seems the zpp 'z' specifier is always like >> ZVAL_DEREF, right? So Z_PARAM_ZVAL has no equivalent in traditional zpp. >> At the very least, this would seem to suggest a difference in >> behavior/functionality. But I haven't found any (or bug reports, if tests >> didn't cover something). >> > > Oops! No, plain zpp 'z' does not have ZVAL_DEREF() applied, of course. > But it's also using zend_parse_arg_zval_DEREF(), which is wrong... (in the > case of "z!" with reference to IS_NULL?). Sorry. I don't understand you without context. If you think something is wrong in current implementation - please, demonstrate it with test cases, examples or code references. If you talk about your code, then show it. Thanks. Dmitry. > At first I assumed Z_PARAM_ZVAL would keep IS_REFERENCE types, since it >> doesn't do ZVAL_DEREF(), but this obviously isn't happening with >> references. (It seems they're getting DEREF()'d in VM when sending params, >> I guess...?) >> > > Still stands though that IS_REFERENCE doesn't seem to get through anyway > (and would break functions). Is any ZVAL_DEREF() *not* necessary? > > > - Matt > --047d7ba97972e848eb051d0dbf36--