From: Vincent Pit Date: Wed, 26 Oct 2011 20:43:38 +0000 (+0200) Subject: Minimize the accesses to the optree during the uvar/clear hack X-Git-Tag: v0.47~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=6d398b4ceb1bdd5d01a6fbf16f6092444fd4a878;p=perl%2Fmodules%2FVariable-Magic.git Minimize the accesses to the optree during the uvar/clear hack --- diff --git a/Magic.xs b/Magic.xs index 1e6a77c..7fee00e 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1305,16 +1305,16 @@ STATIC I32 vmg_svt_val(pTHX_ IV action, SV *sv) { * mistaken for a tied hash by the rest of hv_common. It will be reset by * the op_ppaddr of a new fake op injected between the current and the next * one. */ - OP *o = PL_op; - if (!o->op_next || o->op_next->op_ppaddr != vmg_pp_resetuvar) { + OP *nop = PL_op->op_next; + if (!nop || nop->op_ppaddr != vmg_pp_resetuvar) { SVOP *svop; NewOp(1101, svop, 1, SVOP); svop->op_type = OP_STUB; svop->op_ppaddr = vmg_pp_resetuvar; - svop->op_next = o->op_next; + svop->op_next = nop; svop->op_flags = 0; svop->op_sv = sv; - o->op_next = (OP *) svop; + PL_op->op_next = (OP *) svop; } SvRMAGICAL_off(sv); }