| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
/* |
|
2
|
|
|
|
|
|
|
* This file was generated automatically by ExtUtils::ParseXS version 3.34 from the |
|
3
|
|
|
|
|
|
|
* contents of MyTest.xs. Do not edit this file, edit MyTest.xs instead. |
|
4
|
|
|
|
|
|
|
* |
|
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
|
6
|
|
|
|
|
|
|
* |
|
7
|
|
|
|
|
|
|
*/ |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "t/lib/MyTest.xs" |
|
10
|
|
|
|
|
|
|
#include |
|
11
|
|
|
|
|
|
|
#include |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
using namespace xs; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
static peep_t prev_rpeepp; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
static int post = 0; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
OP* intercepted_entersub(pTHX) { |
|
20
|
|
|
|
|
|
|
auto ret = PL_ppaddr[OP_ENTERSUB](aTHX); |
|
21
|
|
|
|
|
|
|
++post; |
|
22
|
|
|
|
|
|
|
return ret; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
static void my_rpeep(pTHX_ OP *first) |
|
26
|
|
|
|
|
|
|
{ |
|
27
|
|
|
|
|
|
|
auto mark = [] (OP* it) { |
|
28
|
|
|
|
|
|
|
if (it->op_type == OP_ENTERSUB) { |
|
29
|
|
|
|
|
|
|
it->op_ppaddr = &intercepted_entersub; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
}; |
|
32
|
|
|
|
|
|
|
OP *o, *t; |
|
33
|
|
|
|
|
|
|
for(t = o = first; o; o = o->op_next, t = t->op_next) { |
|
34
|
|
|
|
|
|
|
mark(o); |
|
35
|
|
|
|
|
|
|
o = o->op_next; |
|
36
|
|
|
|
|
|
|
if(!o || o == t) break; |
|
37
|
|
|
|
|
|
|
mark(o); |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
prev_rpeepp(aTHX_ first); |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#line 43 "t/lib/MyTest_xsgen.cc" |
|
43
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
|
44
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
|
45
|
|
|
|
|
|
|
#endif |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
#ifndef dVAR |
|
48
|
|
|
|
|
|
|
# define dVAR dNOOP |
|
49
|
|
|
|
|
|
|
#endif |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
|
53
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
|
54
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
|
55
|
|
|
|
|
|
|
#endif |
|
56
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
|
57
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
|
58
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
|
59
|
|
|
|
|
|
|
#endif |
|
60
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
|
61
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
|
62
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
|
63
|
|
|
|
|
|
|
#endif |
|
64
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
|
65
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
|
66
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
|
67
|
|
|
|
|
|
|
#endif |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
|
70
|
|
|
|
|
|
|
* XS macro. |
|
71
|
|
|
|
|
|
|
* |
|
72
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
|
73
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
|
74
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
|
75
|
|
|
|
|
|
|
* |
|
76
|
|
|
|
|
|
|
* See XSUB.h in core! |
|
77
|
|
|
|
|
|
|
*/ |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
|
81
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
|
82
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
|
83
|
|
|
|
|
|
|
# undef XS_INTERNAL |
|
84
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
|
85
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
|
86
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
87
|
|
|
|
|
|
|
# endif |
|
88
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
|
89
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
|
90
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
|
91
|
|
|
|
|
|
|
# endif |
|
92
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
|
93
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
|
94
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
|
95
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
|
96
|
|
|
|
|
|
|
# else |
|
97
|
|
|
|
|
|
|
# ifdef __cplusplus |
|
98
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
|
99
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
|
100
|
|
|
|
|
|
|
# else |
|
101
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
|
102
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
103
|
|
|
|
|
|
|
# endif |
|
104
|
|
|
|
|
|
|
# endif |
|
105
|
|
|
|
|
|
|
# endif |
|
106
|
|
|
|
|
|
|
#endif |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
|
112
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
|
113
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
|
114
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
|
115
|
|
|
|
|
|
|
*/ |
|
116
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
|
117
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
|
118
|
|
|
|
|
|
|
#endif |
|
119
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
|
120
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
|
121
|
|
|
|
|
|
|
#endif |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
|
124
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
|
125
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
|
126
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
|
127
|
|
|
|
|
|
|
*/ |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
#undef XS_EUPXS |
|
130
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
|
131
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
|
132
|
|
|
|
|
|
|
#else |
|
133
|
|
|
|
|
|
|
/* default to internal */ |
|
134
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
|
135
|
|
|
|
|
|
|
#endif |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
138
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
|
141
|
|
|
|
|
|
|
STATIC void |
|
142
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
STATIC void |
|
145
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
|
146
|
|
|
|
|
|
|
{ |
|
147
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
if (gv) { |
|
152
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
|
153
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
|
154
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
if (hvname) |
|
157
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
|
158
|
|
|
|
|
|
|
else |
|
159
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
|
160
|
|
|
|
|
|
|
} else { |
|
161
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
|
162
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
|
163
|
|
|
|
|
|
|
} |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
#endif |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
|
172
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
|
173
|
|
|
|
|
|
|
*/ |
|
174
|
|
|
|
|
|
|
#ifdef newXS_flags |
|
175
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
|
176
|
|
|
|
|
|
|
#else |
|
177
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
|
178
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
181
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
|
182
|
|
|
|
|
|
|
#else |
|
183
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
|
184
|
|
|
|
|
|
|
#endif |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
#line 187 "t/lib/MyTest_xsgen.cc" |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
|
189
|
120
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_marker) { xs::throw_guard(cv, [=]() |
|
190
|
|
|
|
|
|
|
{ |
|
191
|
60
|
|
|
|
|
|
dVAR; dXSARGS; |
|
192
|
60
|
50
|
|
|
|
|
if (items != 0) |
|
193
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
194
|
|
|
|
|
|
|
{ |
|
195
|
|
|
|
|
|
|
int RETVAL; |
|
196
|
60
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
#line 43 "t/lib/MyTest.xs" |
|
198
|
|
|
|
|
|
|
RETVAL = post; |
|
199
|
|
|
|
|
|
|
#line 200 "t/lib/MyTest_xsgen.cc" |
|
200
|
60
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
} |
|
202
|
60
|
|
|
|
|
|
XSRETURN(1); |
|
203
|
60
|
50
|
|
|
|
|
}); } |
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
|
207
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_test) { xs::throw_guard(cv, [=]() |
|
208
|
|
|
|
|
|
|
{ |
|
209
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
210
|
0
|
0
|
|
|
|
|
if (items != 0) |
|
211
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
212
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
213
|
0
|
|
|
|
|
|
SP -= items; |
|
214
|
|
|
|
|
|
|
{ |
|
215
|
|
|
|
|
|
|
#line 47 "t/lib/MyTest.xs" |
|
216
|
|
|
|
|
|
|
// no-op |
|
217
|
|
|
|
|
|
|
#line 218 "t/lib/MyTest_xsgen.cc" |
|
218
|
0
|
|
|
|
|
|
PUTBACK; |
|
219
|
0
|
|
|
|
|
|
return; |
|
220
|
|
|
|
|
|
|
} |
|
221
|
0
|
0
|
|
|
|
|
}); } |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
224
|
|
|
|
|
|
|
extern "C" |
|
225
|
|
|
|
|
|
|
#endif |
|
226
|
|
|
|
|
|
|
|
|
227
|
16
|
|
|
|
|
|
XS_EXTERNAL(boot_MyTest) { xs::throw_guard(cv, [=]() mutable |
|
228
|
|
|
|
|
|
|
{ |
|
229
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
230
|
|
|
|
|
|
|
dVAR; dXSARGS; |
|
231
|
|
|
|
|
|
|
#else |
|
232
|
8
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
|
50
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
#endif |
|
234
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
|
235
|
|
|
|
|
|
|
char* file = __FILE__; |
|
236
|
|
|
|
|
|
|
#else |
|
237
|
8
|
|
|
|
|
|
const char* file = __FILE__; |
|
238
|
|
|
|
|
|
|
#endif |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
243
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
|
244
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
245
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
|
246
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
|
247
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
|
248
|
|
|
|
|
|
|
# endif |
|
249
|
|
|
|
|
|
|
#endif |
|
250
|
|
|
|
|
|
|
|
|
251
|
8
|
|
|
|
|
|
newXS_deffile("MyTest::marker", XS_MyTest_marker); |
|
252
|
8
|
|
|
|
|
|
newXS_deffile("MyTest::test", XS_MyTest_test); |
|
253
|
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
/* Initialisation Section */ |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
#line 37 "t/lib/MyTest.xs" |
|
257
|
|
|
|
|
|
|
{ |
|
258
|
|
|
|
|
|
|
prev_rpeepp = PL_rpeepp; |
|
259
|
|
|
|
|
|
|
PL_rpeepp = my_rpeep; |
|
260
|
|
|
|
|
|
|
} |
|
261
|
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
#line 263 "t/lib/MyTest_xsgen.cc" |
|
263
|
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
267
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
|
268
|
|
|
|
|
|
|
if (PL_unitcheckav) |
|
269
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
|
270
|
|
|
|
|
|
|
# endif |
|
271
|
|
|
|
|
|
|
XSRETURN_YES; |
|
272
|
|
|
|
|
|
|
#else |
|
273
|
8
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
|
274
|
|
|
|
|
|
|
#endif |
|
275
|
8
|
50
|
|
|
|
|
}); } |
|
276
|
|
|
|
|
|
|
|