line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include |
2
|
|
|
|
|
|
|
#include |
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
namespace xs { |
7
|
|
|
|
|
|
|
|
8
|
14
|
|
|
|
|
|
Stash Sub::stash () const { return CvSTASH((CV*)sv); } |
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
|
|
|
Glob Sub::glob () const { return CvGV((CV*)sv); } |
11
|
|
|
|
|
|
|
|
12
|
5
|
|
|
|
|
|
void Sub::_throw_super () const { |
13
|
5
|
50
|
|
|
|
|
throw std::invalid_argument(panda::string("can't locate super method '") + name() + "' via package '" + stash().name() + "'"); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
301
|
|
|
|
|
|
size_t Sub::_call (CV* cv, I32 flags, const CallArgs& args, SV** ret, size_t maxret, AV** avr) { |
17
|
301
|
50
|
|
|
|
|
dTHX; dSP; ENTER; SAVETMPS; |
|
|
50
|
|
|
|
|
|
18
|
301
|
50
|
|
|
|
|
PUSHMARK(SP); |
|
|
0
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
301
|
100
|
|
|
|
|
if (args.self) XPUSHs(args.self); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
21
|
309
|
100
|
|
|
|
|
if (args.scalars) for (size_t i = 0; i < args.items; ++i) XPUSHs(args.scalars[i] ? args.scalars[i].get() : &PL_sv_undef); |
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
22
|
771
|
100
|
|
|
|
|
else for (size_t i = 0; i < args.items; ++i) XPUSHs(args.list[i] ? args.list[i] : &PL_sv_undef); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
23
|
301
|
|
|
|
|
|
PUTBACK; |
24
|
|
|
|
|
|
|
|
25
|
301
|
100
|
|
|
|
|
if (!maxret && !avr) flags |= G_DISCARD; |
|
|
100
|
|
|
|
|
|
26
|
301
|
50
|
|
|
|
|
size_t count = call_sv((SV*)cv, flags|G_EVAL); |
27
|
301
|
|
|
|
|
|
SPAGAIN; |
28
|
|
|
|
|
|
|
|
29
|
301
|
|
|
|
|
|
auto errsv = GvSV(PL_errgv); |
30
|
301
|
50
|
|
|
|
|
if (SvTRUE(errsv)) { |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
31
|
2
|
100
|
|
|
|
|
while (count > 0) { POPs; --count; } |
32
|
1
|
50
|
|
|
|
|
PUTBACK; FREETMPS; LEAVE; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
33
|
2
|
|
|
|
|
|
auto exc = Sv::noinc(errsv); |
34
|
1
|
50
|
|
|
|
|
GvSV(PL_errgv) = newSVpvs(""); |
35
|
1
|
|
|
|
|
|
throw exc; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
300
|
100
|
|
|
|
|
auto nret = count > maxret ? maxret : count; |
39
|
|
|
|
|
|
|
|
40
|
300
|
100
|
|
|
|
|
if (!avr) { |
41
|
300
|
100
|
|
|
|
|
while (count > maxret) { POPs; --count; } |
42
|
433
|
100
|
|
|
|
|
while (count > 0) ret[--count] = SvREFCNT_inc_NN(POPs); |
43
|
|
|
|
|
|
|
} |
44
|
2
|
50
|
|
|
|
|
else if (count) { |
45
|
2
|
|
|
|
|
|
nret = count; |
46
|
2
|
50
|
|
|
|
|
AV* av = *avr = newAV(); |
47
|
2
|
50
|
|
|
|
|
av_extend(av, count-1); |
48
|
2
|
|
|
|
|
|
AvFILLp(av) = count-1; |
49
|
2
|
|
|
|
|
|
SV** svlist = AvARRAY(av); |
50
|
8
|
100
|
|
|
|
|
while (count--) svlist[count] = SvREFCNT_inc_NN(POPs); |
51
|
|
|
|
|
|
|
} |
52
|
0
|
|
|
|
|
|
else *avr = NULL; |
53
|
|
|
|
|
|
|
|
54
|
300
|
100
|
|
|
|
|
PUTBACK; FREETMPS; LEAVE; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
300
|
|
|
|
|
|
return nret; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} |