summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-27 22:30:54 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-30 11:48:42 -0800
commit0f94cb1fe27e58a59d3391214dab34037ab184db (patch)
tree00f43fa153a153b7e2a1d1728b6a9880264fa132 /scope.h
parentb19cb98db58c735b4237857f7f69fd857d61934a (diff)
downloadperl-0f94cb1fe27e58a59d3391214dab34037ab184db.tar.gz
[perl #123223] Make PADNAME a separate type
distinct from SV. This should fix the CPAN modules that were failing when the PadnameLVALUE flag was added, because it shared the same bit as SVs_OBJECT and pad names were going through code paths not designed to handle pad names. Unfortunately, it will probably break other CPAN modules, but I think this change is for the better, as it makes both pad names and SVs sim- pler and makes pad names take less memory.
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/scope.h b/scope.h
index cad02cd881..c6a44ba0d4 100644
--- a/scope.h
+++ b/scope.h
@@ -39,12 +39,12 @@
#define SAVEt_PARSER 19
#define SAVEt_STACK_POS 20
#define SAVEt_READONLY_OFF 21
+#define SAVEt_FREEPADNAME 22
-#define SAVEt_ARG1_MAX 21
+#define SAVEt_ARG1_MAX 22
/* two args */
-#define SAVEt_APTR 22
#define SAVEt_AV 23
#define SAVEt_DESTRUCTOR 24
#define SAVEt_DESTRUCTOR_X 25
@@ -69,17 +69,19 @@
#define SAVEt_SVREF 44
#define SAVEt_VPTR 45
#define SAVEt_ADELETE 46
+#define SAVEt_APTR 47
-#define SAVEt_ARG2_MAX 46
+#define SAVEt_ARG2_MAX 47
/* three args */
-#define SAVEt_DELETE 47
#define SAVEt_HELEM 48
#define SAVEt_PADSV_AND_MORTALIZE 49
#define SAVEt_SET_SVFLAGS 50
#define SAVEt_GVSLOT 51
#define SAVEt_AELEM 52
+#define SAVEt_DELETE 53
+
#define SAVEf_SETMAGIC 1
#define SAVEf_KEEPOLDELEM 2
@@ -240,6 +242,7 @@ scope has the given name. Name must be a literal string.
#define SAVEVPTR(s) save_vptr((void*)&(s))
#define SAVEPADSVANDMORTALIZE(s) save_padsv_and_mortalize(s)
#define SAVEFREESV(s) save_freesv(MUTABLE_SV(s))
+#define SAVEFREEPADNAME(s) save_pushptr((void *)(s), SAVEt_FREEPADNAME)
#define SAVEMORTALIZESV(s) save_mortalizesv(MUTABLE_SV(s))
#define SAVEFREEOP(o) save_freeop((OP*)(o))
#define SAVEFREEPV(p) save_freepv((char*)(p))