This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Optimize static methods to subs #329
Comments
|
rurban
added a commit
that referenced
this issue
Dec 13, 2017
Prefer the CV GvSTASH over the GvSTASH of the found name. This was fooled the previous attempts. See #329 Also warn the unsuccessful make_ext cmdline.
rurban
added a commit
that referenced
this issue
Dec 13, 2017
again disable static method optimization threaded because some PAD GV (alias?) gets corrupted. See #329.
not yet done:
|
Threaded perls fixed with a386e87 |
ghost
removed
the
in progress
label
Dec 16, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Was CM-885, part of the GH #23 inliner.
See http://blogs.perl.org/users/rurban/2011/06/how-perl-calls-subs-and-methods.html
It is better to do it with the inline peep check, and not in ck_subr. (Now changed back to ck_subr)
So if any stash already contains the method, use it. No other stash can interfer with that during run-time method-dispatch.
But we cannot use the $obj->method type info, because $obj may be a subtype
of the declared type, which may have a different method.
Add several smaller optims:
convert pushmark-gv(packagename)-args-method_named(GV)-entersub
to pushmark-gv(packagename)-args-gv(GV)-entersub
use the faster cvref not the gv. the biggest problem was that destroying &main::BEGIN cleared the attached GV (missing refcount bump):
Not when a static method is allowed to be redefined. perlcc -O3 may disallow this for perf. reasons.
t/op/symbolcache.t wants to redefine a sub at run-time and this can only be caught with the GV, not the old cvref.
convert entersub to enterxssub for XS methods.
detect class subs called as methods at compile-time already.
using a gv ALIAS e.g. *Carp::Import{CV} pointing to &Exporter::import is forbidden. This needs to be resolved by method_named.
This should be merged earlier than the inliner, because the stable parts are needed for other branches to go on.
op_clone()
is needed to clone roles #311.The text was updated successfully, but these errors were encountered: