diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-29 18:04:35 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-29 18:04:35 -0800 |
commit | e7379046328d84a9e157d44f7a3e7a7d45b13f47 (patch) | |
tree | f6e8c0303ac9b4b93d1f99ffc33e84aab5cf2822 | |
parent | f9946bfddcb8263a2a12f0d56fe1d31ecdafcdec (diff) | |
download | perl-e7379046328d84a9e157d44f7a3e7a7d45b13f47.tar.gz |
sv.c/find_uninit_var: Explain kid-scanning loop better
Hopefully this explanation will be clearer and will prevent clumsy
individuals like me from introducing bugs like #103766.
-rw-r--r-- | sv.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -14265,8 +14265,13 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv, if (!o) break; - /* if all except one arg are constant, or have no side-effects, - * or are optimized away, then it's unambiguous */ + /* This loop checks all the kid ops, skipping any that cannot pos- + * sibly be responsible for the uninitialized value; i.e., defined + * constants and ops that return nothing. If there is only one op + * left that is not skipped, then we *know* it is responsible for + * the uninitialized value. If there is more than one op left, we + * have to look for an exact match in the while() loop below. + */ o2 = NULL; for (kid=o; kid; kid = kid->op_sibling) { if (kid) { |