Parameter parsing for zval type?
| From: | Matt Wilmas | Date: | Tue, 11 Aug 2015 17:20:44 +0000 |
| Subject: | Parameter parsing for zval type? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-87708@lists.php.net to get a copy of this message | ||
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).
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...?)
So is there never a need for ZVAL_DEREF() when parsing params? Shouldn't have 2 FAST_ZPP ZVAL types? Otherwise, why the inconsistency zpp's 'z'?
What am I missing, if anything?? Thanks!
- Matt