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