]> git.vpit.fr Git - perl/modules/autovivification.git/commitdiff
Document that the multideref implementation is only used for exists/delete
authorVincent Pit <vince@profvince.com>
Tue, 12 May 2015 09:54:07 +0000 (11:54 +0200)
committerVincent Pit <vince@profvince.com>
Tue, 12 May 2015 09:54:07 +0000 (11:54 +0200)
autovivification.xs

index 0d7e5ed34e1b0257f1e6aefb1bcb32a7d47b63e6..46422c4002ce3cc80e2aae522e84e076b8672fd9 100644 (file)
@@ -800,6 +800,15 @@ static OP *a_pp_root_binop(pTHX) {
 
 /* ... pp_multideref ....................................................... */
 
 
 /* ... 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;
 
 static UV a_do_multideref(const OP *o, UV flags) {
  UV isexdel, other_flags;