summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorsyber <syber@crazypanda.ru>2014-11-28 21:22:25 +0300
committerFather Chrysostomos <sprout@cpan.org>2014-11-28 18:10:58 -0800
commit7d6c333c75cb0519428c389de3894edcb394d3a0 (patch)
treed03a03a0aaa68b1a8348aea290600d0d7bee4e48 /proto.h
parent5ec005187f9529697da2ef026ddf0a3758600148 (diff)
downloadperl-7d6c333c75cb0519428c389de3894edcb394d3a0.tar.gz
speedup for SUPER::method() calls.
In ck_method: Scan for '/::. If found SUPER::, create OP_METHOD_SUPER op with precomputed hash value for method name. In B::*, added support for method_super In pp_hot.c, pp_method_*: S_method_common removed, code related to getting stash is moved to S_opmethod_stash, other code is moved to pp_method_* functions. As a result, SUPER::func() calls speeded up by 50%.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/proto.h b/proto.h
index a0ce3830c4..b39d4db3c6 100644
--- a/proto.h
+++ b/proto.h
@@ -6605,10 +6605,9 @@ STATIC void S_do_oddball(pTHX_ SV **oddkey, SV **firstkey)
#define PERL_ARGS_ASSERT_DO_ODDBALL \
assert(oddkey); assert(firstkey)
-STATIC SV* S_method_common(pTHX_ SV* meth, U32* hashp)
- __attribute__warn_unused_result__
+PERL_STATIC_INLINE HV* S_opmethod_stash(pTHX_ SV* meth)
__attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_METHOD_COMMON \
+#define PERL_ARGS_ASSERT_OPMETHOD_STASH \
assert(meth)
#endif