#define A_HINT_WARN 2
#define A_HINT_FETCH 4
#define A_HINT_STORE 8
-#define A_HINT_EXISTS 16
-#define A_HINT_DELETE 32
+#define A_HINT_KEYS 16
+#define A_HINT_VALUES 32
+#define A_HINT_EXISTS 64
+#define A_HINT_DELETE 128
#define A_HINT_NOTIFY (A_HINT_STRICT|A_HINT_WARN)
-#define A_HINT_DO (A_HINT_FETCH|A_HINT_STORE|A_HINT_EXISTS|A_HINT_DELETE)
+#define A_HINT_DO (A_HINT_FETCH|A_HINT_STORE|A_HINT_KEYS|A_HINT_VALUES|A_HINT_EXISTS|A_HINT_DELETE)
#define A_HINT_MASK (A_HINT_NOTIFY|A_HINT_DO)
/* Only used in op flags */
-#define A_HINT_ROOT 64
-#define A_HINT_DEREF 128
+#define A_HINT_ROOT 256
+#define A_HINT_DEREF 512
#define XSH_HINTS_TYPE_UV 1
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);
+ } else {
+ if (rflags & (A_HINT_FETCH|A_HINT_KEYS|A_HINT_VALUES))
+ flags = (rflags|A_HINT_DEREF);
+ }
if (!flags) {
cancel:
case OP_KEYS:
old_ck = a_old_ck_keys;
new_pp = a_pp_root_unop;
- enabled = hint & A_HINT_FETCH;
+ enabled = hint & A_HINT_KEYS;
break;
case OP_VALUES:
old_ck = a_old_ck_values;
new_pp = a_pp_root_unop;
- enabled = hint & A_HINT_FETCH;
+ enabled = hint & A_HINT_VALUES;
break;
}
o = old_ck(aTHX_ o);
newCONSTSUB(stash, "A_HINT_WARN", newSVuv(A_HINT_WARN));
newCONSTSUB(stash, "A_HINT_FETCH", newSVuv(A_HINT_FETCH));
newCONSTSUB(stash, "A_HINT_STORE", newSVuv(A_HINT_STORE));
+ newCONSTSUB(stash, "A_HINT_KEYS", newSVuv(A_HINT_KEYS));
+ newCONSTSUB(stash, "A_HINT_VALUES", newSVuv(A_HINT_VALUES));
newCONSTSUB(stash, "A_HINT_EXISTS", newSVuv(A_HINT_EXISTS));
newCONSTSUB(stash, "A_HINT_DELETE", newSVuv(A_HINT_DELETE));
newCONSTSUB(stash, "A_HINT_MASK", newSVuv(A_HINT_MASK));