diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-19 12:11:29 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-23 15:31:35 +0200 |
commit | 9e8ba7891e74a80265e09ff5b810ec947680c1ce (patch) | |
tree | 6550898580da2445d9d54370d2adef6e68a881b3 /.gdbinit | |
parent | 9ec2480bd6d8cadd8ca2ecac07f00fd3d411bc7a (diff) | |
download | php-git-9e8ba7891e74a80265e09ff5b810ec947680c1ce.tar.gz |
Change representation of zend_type from type code to MAY_BE_* mask
This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still assumes
that there is only a single type in the mask (or two together
with MAY_BE_NULL). But this will make it a lot simpler to introduce
union types.
An additional advantage (and why I'm doing this separately), is
that a number of special cases no longer need to be handled
separately: We can do a single mask & (1 << type) check to handle
all simple types, booleans (true|false) and null.
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 23 |
1 files changed, 10 insertions, 13 deletions
@@ -252,37 +252,34 @@ define ____printzv_contents ____printzv &$zvalue->value.ref->val $arg1 end if $type == 11 - printf "const: %s", $zvalue->value.str->val + printf "CONSTANT_AST" end if $type == 12 - printf "CONSTANT_AST" + printf "CALLABLE" end if $type == 13 - printf "indirect: " - ____printzv $zvalue->value.zv $arg1 + printf "ITERABLE" end if $type == 14 - printf "pointer: %p", $zvalue->value.ptr + printf "VOID" end if $type == 15 - printf "_ERROR" + printf "indirect: " + ____printzv $zvalue->value.zv $arg1 end if $type == 16 - printf "_BOOL" + printf "pointer: %p", $zvalue->value.ptr end if $type == 17 - printf "CALLABLE" + printf "_ERROR" end if $type == 18 - printf "ITERABLE" + printf "_BOOL" end if $type == 19 - printf "VOID" - end - if $type == 20 printf "_NUMBER" end - if $type > 20 + if $type > 19 printf "unknown type %d", $type end printf "\n" |