From: Vincent Pit Date: Tue, 12 May 2015 09:54:07 +0000 (+0200) Subject: Document that the multideref implementation is only used for exists/delete X-Git-Tag: v0.15~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=7839df4d069fb2962a189f08bf7c92ff63d261fa;p=perl%2Fmodules%2Fautovivification.git Document that the multideref implementation is only used for exists/delete --- diff --git a/autovivification.xs b/autovivification.xs index 0d7e5ed..46422c4 100644 --- a/autovivification.xs +++ b/autovivification.xs @@ -800,6 +800,15 @@ static OP *a_pp_root_binop(pTHX) { /* ... pp_multideref ....................................................... */ +/* This pp replacement is actually only called for topmost exists/delete ops, + * because we hijack the [ah]elem check functions and this disables the + * optimization for lvalue and rvalue dereferencing. In particular, the + * OPf_MOD branches should never be covered. In the future, the multideref + * optimization might also be disabled for custom exists/delete check functions, + * which will make this section unnecessary. However, the code tries to be as + * general as possible in case I think of a way to reenable the multideref + * optimization even when this module is in use. */ + static UV a_do_multideref(const OP *o, UV flags) { UV isexdel, other_flags;