+
+/* SS_ADD*: newer, faster versions of the above. Don't mix the two sets of
+ * macros. These are fast because they save reduce accesses to the PL_
+ * vars and move the size check to the end. Doing the check last means
+ * that values in registers will have been pushed and no longer needed, so
+ * don't need saving around the call to grow. Also, tail-call elimination
+ * of the grow() can be done. These changes reduce the code of something
+ * like save_pushptrptr() to half its former size.
+ * Of course, doing the size check *after* pushing means we must always
+ * ensure there are SS_MAXPUSH free slots on the savestack. This ensured
+ * bt savestack_grow() and savestack_grow_cnt always allocating SS_MAXPUSH
+ * slots more than asked for, or that it sets PL_savestack_max to
+ *
+ * These are for internal core use only and are subject to change */
+
+#define dSS_ADD \
+ I32 ix = PL_savestack_ix; \
+ ANY *ssp = &PL_savestack[ix]
+
+#define SS_ADD_END(need) \
+ assert((need) <= SS_MAXPUSH); \
+ ix += (need); \
+ PL_savestack_ix = ix; \
+ assert(ix <= PL_savestack_max + SS_MAXPUSH); \
+ if (UNLIKELY(ix > PL_savestack_max)) savestack_grow(); \
+ assert(PL_savestack_ix <= PL_savestack_max);
+
+#define SS_ADD_INT(i) ((ssp++)->any_i32 = (I32)(i))
+#define SS_ADD_LONG(i) ((ssp++)->any_long = (long)(i))
+#define SS_ADD_BOOL(p) ((ssp++)->any_bool = (p))
+#define SS_ADD_IV(i) ((ssp++)->any_iv = (IV)(i))
+#define SS_ADD_UV(u) ((ssp++)->any_uv = (UV)(u))
+#define SS_ADD_PTR(p) ((ssp++)->any_ptr = (void*)(p))
+#define SS_ADD_DPTR(p) ((ssp++)->any_dptr = (p))
+#define SS_ADD_DXPTR(p) ((ssp++)->any_dxptr = (p))
+