summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-11-10 14:44:10 +0000
committerDavid Mitchell <davem@iabyn.com>2016-11-12 16:15:09 +0000
commit4c57ced57467061af9e672665cba30edd3391432 (patch)
tree2a3aad023851e220609e6aa3c79522d9124af3c0 /inline.h
parent8efda520355126b24fb7c81c753eb2028dcc43bd (diff)
downloadperl-4c57ced57467061af9e672665cba30edd3391432.tar.gz
remove eval's usage of SvSCREAM
Currently the SvSCREAM flag is set on the sv pointed to by cx->blk_eval.cur_text, to indicate that it is ref counted. Instead, use a spare bit in the blk_u16 field of the eval context. This is to reduce the number of odd special cases for the SvSCREAM flag.
Diffstat (limited to 'inline.h')
-rw-r--r--inline.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/inline.h b/inline.h
index adcd85d24b..5d516da2f8 100644
--- a/inline.h
+++ b/inline.h
@@ -1490,9 +1490,9 @@ S_cx_pusheval(pTHX_ PERL_CONTEXT *cx, OP *retop, SV *namesv)
cx->blk_eval.cv = NULL; /* later set by doeval_compile() */
cx->blk_eval.cur_top_env = PL_top_env;
- assert(!(PL_in_eval & ~ 0x7F));
+ assert(!(PL_in_eval & ~ 0x3F));
assert(!(PL_op->op_type & ~0x1FF));
- cx->blk_u16 = (PL_in_eval & 0x7F) | ((U16)PL_op->op_type << 7);
+ cx->blk_u16 = (PL_in_eval & 0x3F) | ((U16)PL_op->op_type << 7);
}
@@ -1505,9 +1505,10 @@ S_cx_popeval(pTHX_ PERL_CONTEXT *cx)
assert(CxTYPE(cx) == CXt_EVAL);
PL_in_eval = CxOLD_IN_EVAL(cx);
+ assert(!(PL_in_eval & 0xc0));
PL_eval_root = cx->blk_eval.old_eval_root;
sv = cx->blk_eval.cur_text;
- if (sv && SvSCREAM(sv)) {
+ if (sv && CxEVAL_TXT_REFCNTED(cx)) {
cx->blk_eval.cur_text = NULL;
SvREFCNT_dec_NN(sv);
}