You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
See [cperl #87]
We have two ways to constant fold subs.
fold to a fast CONSTSUB without entersub
and fold to a dummy XS call with returning the value immediately.
there’s no semantic visibility of those 3 variants, other than the required
() proto or the usage of use constant pragma. there’s no semantic
distinction of constant folded to CONSTSUB, dummy_xs or not constant folded
subs, other than improved run-time performance and a different internal
representation.
dropping the requirement to use the () seems
1. fair, and
2. even other prototypes should be allowed to fold
if those parameters are ignored in the body, when at compile-time the body
folds to a constant sv.
WIP: but I am getting prototype mismatches
CHANGE: set the proto of the created dummy XS to "" or "$" if a method.
0 commit comments