From d648ffcb179b885089e064ec1d58c60027c80915 Mon Sep 17 00:00:00 2001 From: syber Date: Mon, 24 Nov 2014 18:55:15 +0300 Subject: Remove op_const_class; just use the name on the stack Instead of storing the class name in the op_const_class field of the METHOP in addition to pushing it on to the stack, just use the item on the stack. This also makes $class->method faster if $class is already a shared hash string. --- op.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'op.h') diff --git a/op.h b/op.h index f0abfac44b..e4fadf65b1 100644 --- a/op.h +++ b/op.h @@ -202,11 +202,6 @@ struct methop { OP* op_first; /* optree for method name */ SV* op_meth_sv; /* static method name */ } op_u; -#ifdef USE_ITHREADS - PADOFFSET op_class_targ; /* pad index for class name if threaded */ -#else - SV* op_class_sv; /* static class name */ -#endif }; struct pmop { @@ -446,8 +441,6 @@ struct loop { ? cSVOPx(v)->op_sv : PAD_SVl((v)->op_targ)) # define cSVOPx_svp(v) (cSVOPx(v)->op_sv \ ? &cSVOPx(v)->op_sv : &PAD_SVl((v)->op_targ)) -# define cMETHOPx_class(v) (cMETHOPx(v)->op_class_targ ? \ - PAD_SVl(cMETHOPx(v)->op_class_targ) : NULL) #else # define cGVOPx_gv(o) ((GV*)cSVOPx(o)->op_sv) # ifndef PERL_CORE @@ -456,7 +449,6 @@ struct loop { # endif # define cSVOPx_sv(v) (cSVOPx(v)->op_sv) # define cSVOPx_svp(v) (&cSVOPx(v)->op_sv) -# define cMETHOPx_class(v) (cMETHOPx(v)->op_class_sv) #endif # define cMETHOPx_meth(v) cSVOPx_sv(v) -- cgit v1.2.1