Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit f604ba1

Browse files
committed
disable cv_do_inline, op_clone_sv
only needed for PERL_INLINE_SUBS, not for role cloning.
1 parent 89ca276 commit f604ba1

File tree

4 files changed

+29
-25
lines changed

4 files changed

+29
-25
lines changed

embed.fnc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,12 +1276,12 @@ i|core_types_t |stash_to_coretype|NULLOK const HV* stash
12761276
s|core_types_t |arg_type_sv |NN SV* sv|NULLOK char** usertype|NULLOK int* u8
12771277
in |int |match_type1 |const U32 sig|core_types_t arg1
12781278
in |int |match_type2 |const U32 sig|core_types_t arg1|core_types_t arg2
1279+
i |OP* |new_entersubop |NN GV* gv |NN OP* arg
12791280
# ifdef PERL_INLINE_SUBS
12801281
sM |bool |cv_check_inline|NN const OP *o|NN CV *compcv
1281-
# endif
12821282
sM |OP* |cv_do_inline |NULLOK OP *parent|NN OP *o|NN OP *cvop|NN CV *cv
1283-
i |OP* |new_entersubop |NN GV* gv |NN OP* arg
12841283
sM |OP* |op_clone_sv |NN OP* o
1284+
# endif
12851285
# endif
12861286
#endif
12871287
: Used in op.c, pp_hot.c, and universal.c

embed.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,6 @@
565565
#define op_append_elem(a,b,c) Perl_op_append_elem(aTHX_ a,b,c)
566566
#define op_append_list(a,b,c) Perl_op_append_list(aTHX_ a,b,c)
567567
#define op_class(a) Perl_op_class(aTHX_ a)
568-
#define op_clone_optree(a,b) Perl_op_clone_optree(aTHX_ a,b)
569568
#define op_contextualize(a,b) Perl_op_contextualize(aTHX_ a,b)
570569
#define op_convert_list(a,b,c) Perl_op_convert_list(aTHX_ a,b,c)
571570
#define op_dump(a) Perl_op_dump(aTHX_ a)
@@ -1066,6 +1065,7 @@
10661065
#define newPADNAMEpvn_flags Perl_newPADNAMEpvn_flags
10671066
#define newSVsv(a) Perl_newSVsv(aTHX_ a)
10681067
#define numfields(a) Perl_numfields(aTHX_ a)
1068+
#define op_clone_optree(a,b) Perl_op_clone_optree(aTHX_ a,b)
10691069
#define op_dump_cv(a,b) Perl_op_dump_cv(aTHX_ a,b)
10701070
#define op_lvalue_flags(a,b,c) Perl_op_lvalue_flags(aTHX_ a,b,c)
10711071
#define pad_find_outer(a,b) Perl_pad_find_outer(aTHX_ a,b)
@@ -1896,6 +1896,8 @@
18961896
# if defined(PERL_IN_OP_C)
18971897
# if defined(USE_CPERL)
18981898
#define cv_check_inline(a,b) S_cv_check_inline(aTHX_ a,b)
1899+
#define cv_do_inline(a,b,c,d) S_cv_do_inline(aTHX_ a,b,c,d)
1900+
#define op_clone_sv(a) S_op_clone_sv(aTHX_ a)
18991901
# endif
19001902
# endif
19011903
# endif
@@ -2077,7 +2079,6 @@
20772079
#define const_av_xsub(a) S_const_av_xsub(aTHX_ a)
20782080
#define const_sv_xsub(a) S_const_sv_xsub(aTHX_ a)
20792081
#define core_type_name(a) S_core_type_name(aTHX_ a)
2080-
#define cv_do_inline(a,b,c,d) S_cv_do_inline(aTHX_ a,b,c,d)
20812082
#define do_method_finalize(a,b,c,d) S_do_method_finalize(aTHX_ a,b,c,d)
20822083
#define io_hints(a) S_io_hints(aTHX_ a)
20832084
#define is_types_strict() S_is_types_strict(aTHX)
@@ -2093,7 +2094,6 @@
20932094
#define new_entersubop(a,b) S_new_entersubop(aTHX_ a,b)
20942095
#define new_slab(a) S_new_slab(aTHX_ a)
20952096
#define op_check_type(a,b,c,d) S_op_check_type(aTHX_ a,b,c,d)
2096-
#define op_clone_sv(a) S_op_clone_sv(aTHX_ a)
20972097
#define op_const_sv(a,b,c) S_op_const_sv(aTHX_ a,b,c)
20982098
#define op_destroy(a) S_op_destroy(aTHX_ a)
20992099
#define op_fixup(a,b,c) S_op_fixup(aTHX_ a,b,c)

op.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11728,6 +11728,8 @@ Perl_op_clone_optree(pTHX_ OP* o, bool init) {
1172811728
return first;
1172911729
}
1173011730

11731+
#ifdef PERL_INLINE_SUBS
11732+
1173111733
/* clones the underlying data, not the op.
1173211734
* TODO: finish
1173311735
*/
@@ -11864,7 +11866,7 @@ S_cv_do_inline(pTHX_ OP* parent, OP *o, OP *cvop, CV *cv)
1186411866
return NULL;
1186511867
firstop = o; /* that's the LEAVESUB, will be converted into a LEAVE or skipped */
1186611868
assert(IS_TYPE(firstop, LEAVESUB));
11867-
/* scan the new body - to be inlined - if enter/leave is needed,
11869+
/* scan the new body - to be inlined - if enter/leave is needed,
1186811870
* if it's too large, and convert all nextstate to setstate+keepstate's.
1186911871
* forgot about the seen_logop.
1187011872
*/
@@ -12097,6 +12099,8 @@ S_cv_do_inline(pTHX_ OP* parent, OP *o, OP *cvop, CV *cv)
1209712099
return firstop;
1209812100
}
1209912101

12102+
#endif
12103+
1210012104
static void
1210112105
S_already_defined(pTHX_ CV *const cv, OP * const block, OP * const o,
1210212106
PADNAME * const name, SV ** const const_svp)

proto.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4178,13 +4178,6 @@ PERL_CALLCONV void Perl_op_clear(pTHX_ OP* o)
41784178
#define PERL_ARGS_ASSERT_OP_CLEAR \
41794179
assert(o)
41804180

4181-
PERL_CALLCONV OP* Perl_op_clone_optree(pTHX_ OP* o, bool init)
4182-
__attribute__global__
4183-
__attribute__warn_unused_result__
4184-
__attribute__nonnull__(pTHX_1);
4185-
#define PERL_ARGS_ASSERT_OP_CLONE_OPTREE \
4186-
assert(o)
4187-
41884181
PERL_CALLCONV OP* Perl_op_contextualize(pTHX_ OP* o, I32 context)
41894182
__attribute__global__
41904183
__attribute__nonnull__(pTHX_1);
@@ -8077,6 +8070,18 @@ STATIC bool S_cv_check_inline(pTHX_ const OP *o, CV *compcv)
80778070
#define PERL_ARGS_ASSERT_CV_CHECK_INLINE \
80788071
assert(o); assert(compcv)
80798072

8073+
STATIC OP* S_cv_do_inline(pTHX_ OP *parent, OP *o, OP *cvop, CV *cv)
8074+
__attribute__nonnull__(pTHX_2)
8075+
__attribute__nonnull__(pTHX_3)
8076+
__attribute__nonnull__(pTHX_4);
8077+
#define PERL_ARGS_ASSERT_CV_DO_INLINE \
8078+
assert(o); assert(cvop); assert(cv)
8079+
8080+
STATIC OP* S_op_clone_sv(pTHX_ OP* o)
8081+
__attribute__nonnull__(pTHX_1);
8082+
#define PERL_ARGS_ASSERT_OP_CLONE_SV \
8083+
assert(o)
8084+
80808085
# endif
80818086
# endif
80828087
#endif
@@ -8799,13 +8804,6 @@ STATIC void S_const_sv_xsub(pTHX_ CV* cv)
87998804
#ifndef PERL_NO_INLINE_FUNCTIONS
88008805
PERL_STATIC_INLINE const char * S_core_type_name(pTHX_ core_types_t t);
88018806
#endif
8802-
STATIC OP* S_cv_do_inline(pTHX_ OP *parent, OP *o, OP *cvop, CV *cv)
8803-
__attribute__nonnull__(pTHX_2)
8804-
__attribute__nonnull__(pTHX_3)
8805-
__attribute__nonnull__(pTHX_4);
8806-
#define PERL_ARGS_ASSERT_CV_DO_INLINE \
8807-
assert(o); assert(cvop); assert(cv)
8808-
88098807
STATIC void S_do_method_finalize(pTHX_ const HV* klass, const CV* cv, OP* o, const PADOFFSET self)
88108808
__attribute__nonnull__(pTHX_1)
88118809
__attribute__nonnull__(pTHX_2)
@@ -8885,11 +8883,6 @@ STATIC void S_op_check_type(pTHX_ OP* o, OP* left, OP* right, bool is_assign)
88858883
#define PERL_ARGS_ASSERT_OP_CHECK_TYPE \
88868884
assert(o); assert(left); assert(right)
88878885

8888-
STATIC OP* S_op_clone_sv(pTHX_ OP* o)
8889-
__attribute__nonnull__(pTHX_1);
8890-
#define PERL_ARGS_ASSERT_OP_CLONE_SV \
8891-
assert(o)
8892-
88938886
STATIC SV* S_op_const_sv(pTHX_ const OP *o, CV *cv, bool allow_lex)
88948887
__attribute__nonnull__(pTHX_1)
88958888
__attribute__nonnull__(pTHX_2);
@@ -11279,6 +11272,13 @@ PERL_CALLCONV U16 Perl_numfields(pTHX_ const HV* klass)
1127911272
#define PERL_ARGS_ASSERT_NUMFIELDS \
1128011273
assert(klass)
1128111274

11275+
PERL_CALLCONV OP* Perl_op_clone_optree(pTHX_ OP* o, bool init)
11276+
__attribute__global__
11277+
__attribute__warn_unused_result__
11278+
__attribute__nonnull__(pTHX_1);
11279+
#define PERL_ARGS_ASSERT_OP_CLONE_OPTREE \
11280+
assert(o)
11281+
1128211282
PERL_CALLCONV void Perl_op_dump_cv(pTHX_ const OP *o, const CV *cv)
1128311283
__attribute__global__
1128411284
__attribute__nonnull__(pTHX_1);

0 commit comments

Comments
 (0)