+/* ... Decide whether this expression should be autovivified or not ........ */
+
+STATIC UV a_map_resolve(const OP *o, a_op_info *oi) {
+ UV flags = 0, rflags;
+ const OP *root;
+ a_op_info *roi = oi;
+
+ while (!(roi->flags & A_HINT_ROOT))
+ roi = roi->next;
+ if (!roi)
+ goto cancel;
+
+ rflags = roi->flags & ~A_HINT_ROOT;
+ if (!rflags)
+ goto cancel;
+
+ root = roi->next;
+ if (root->op_flags & OPf_MOD) {
+ if (rflags & A_HINT_STORE)
+ flags = (A_HINT_STORE|A_HINT_DEREF);
+ } else if (rflags & A_HINT_FETCH)
+ flags = (A_HINT_FETCH|A_HINT_DEREF);
+
+ if (!flags) {
+cancel:
+ a_map_update_flags_bottomup(o, 0, 0);
+ return 0;
+ }
+
+ flags |= (rflags & A_HINT_NOTIFY);
+ a_map_update_flags_bottomup(o, flags, 0);
+
+ return oi->flags & A_HINT_ROOT ? 0 : flags;
+}
+