line |
stmt |
bran |
cond |
sub |
time |
code |
1
|
|
|
|
|
|
#define PERL_constant_NOTFOUND 1 |
2
|
|
|
|
|
|
#define PERL_constant_NOTDEF 2 |
3
|
|
|
|
|
|
#define PERL_constant_ISIV 3 |
4
|
|
|
|
|
|
#define PERL_constant_ISNO 4 |
5
|
|
|
|
|
|
#define PERL_constant_ISNV 5 |
6
|
|
|
|
|
|
#define PERL_constant_ISPV 6 |
7
|
|
|
|
|
|
#define PERL_constant_ISPVN 7 |
8
|
|
|
|
|
|
#define PERL_constant_ISSV 8 |
9
|
|
|
|
|
|
#define PERL_constant_ISUNDEF 9 |
10
|
|
|
|
|
|
#define PERL_constant_ISUV 10 |
11
|
|
|
|
|
|
#define PERL_constant_ISYES 11 |
12
|
|
|
|
|
|
|
13
|
|
|
|
|
|
#ifndef NVTYPE |
14
|
|
|
|
|
|
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ |
15
|
|
|
|
|
|
#endif |
16
|
|
|
|
|
|
#ifndef aTHX_ |
17
|
|
|
|
|
|
#define aTHX_ /* 5.6 or later define this for threading support. */ |
18
|
|
|
|
|
|
#endif |
19
|
|
|
|
|
|
#ifndef pTHX_ |
20
|
|
|
|
|
|
#define pTHX_ /* 5.6 or later define this for threading support. */ |
21
|
|
|
|
|
|
#endif |
22
|
|
|
|
|
|
|
23
|
|
|
|
|
|
static void |
24
|
16016
|
|
|
|
|
constant_add_symbol(pTHX_ HV *hash, const char *name, I32 namelen, SV *value) { |
25
|
16016
|
|
|
|
|
HE *he = (HE*) hv_common_key_len(hash, name, namelen, HV_FETCH_LVALUE, NULL, |
26
|
|
|
|
|
|
0); |
27
|
|
|
|
|
|
SV *sv; |
28
|
|
|
|
|
|
|
29
|
16016
|
|
|
|
|
if (!he) { |
30
|
0
|
|
|
|
|
Perl_croak(aTHX_ "Couldn't add key '%s' to %%XS::APItest::", |
31
|
|
|
|
|
|
name); |
32
|
|
|
|
|
|
} |
33
|
16016
|
|
|
|
|
sv = HeVAL(he); |
34
|
32032
|
|
|
|
|
if (SvOK(sv) || SvTYPE(sv) == SVt_PVGV) { |
35
|
|
|
|
|
|
/* Someone has been here before us - have to make a real sub. */ |
36
|
0
|
|
|
|
|
newCONSTSUB(hash, name, value); |
37
|
|
|
|
|
|
} else { |
38
|
32032
|
|
|
|
|
SvUPGRADE(sv, SVt_RV); |
39
|
16016
|
|
|
|
|
SvRV_set(sv, value); |
40
|
16016
|
|
|
|
|
SvROK_on(sv); |
41
|
16016
|
|
|
|
|
SvREADONLY_on(value); |
42
|
|
|
|
|
|
} |
43
|
16016
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
47
|
|
|
|
|
|
#ifndef SYMBIAN |
48
|
|
|
|
|
|
|
49
|
|
|
|
|
|
/* Store a hash of all symbols missing from the package. To avoid trampling on |
50
|
|
|
|
|
|
the package namespace (uninvited) put each package's hash in our namespace. |
51
|
|
|
|
|
|
To avoid creating lots of typeblogs and symbol tables for sub-packages, put |
52
|
|
|
|
|
|
each package's hash into one hash in our namespace. */ |
53
|
|
|
|
|
|
|
54
|
|
|
|
|
|
static HV * |
55
|
|
|
|
|
|
get_missing_hash(pTHX) { |
56
|
|
|
|
|
|
HV *const parent |
57
|
|
|
|
|
|
= get_hv("ExtUtils::Constant::ProxySubs::Missing", GVf_MULTI); |
58
|
|
|
|
|
|
/* We could make a hash of hashes directly, but this would confuse anything |
59
|
|
|
|
|
|
at Perl space that looks at us, and as we're visible in Perl space, |
60
|
|
|
|
|
|
best to play nice. */ |
61
|
|
|
|
|
|
SV *const *const ref |
62
|
|
|
|
|
|
= hv_fetch(parent, "XS::APItest", 11, TRUE); |
63
|
|
|
|
|
|
HV *new_hv; |
64
|
|
|
|
|
|
|
65
|
|
|
|
|
|
if (!ref) |
66
|
|
|
|
|
|
return NULL; |
67
|
|
|
|
|
|
|
68
|
|
|
|
|
|
if (SvROK(*ref)) |
69
|
|
|
|
|
|
return (HV*) SvRV(*ref); |
70
|
|
|
|
|
|
|
71
|
|
|
|
|
|
new_hv = newHV(); |
72
|
|
|
|
|
|
SvUPGRADE(*ref, SVt_RV); |
73
|
|
|
|
|
|
SvRV_set(*ref, (SV *)new_hv); |
74
|
|
|
|
|
|
SvROK_on(*ref); |
75
|
|
|
|
|
|
return new_hv; |
76
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
78
|
|
|
|
|
|
#endif |
79
|
|
|
|
|
|
|
80
|
|
|
|
|
|
struct notfound_s {const char *name; I32 namelen;} ; |
81
|
|
|
|
|
|
|
82
|
|
|
|
|
|
static const struct notfound_s values_for_notfound[] = |
83
|
|
|
|
|
|
{ |
84
|
|
|
|
|
|
#ifndef HV_DELETE |
85
|
|
|
|
|
|
{ "HV_DELETE", 9 }, |
86
|
|
|
|
|
|
#endif |
87
|
|
|
|
|
|
#ifndef HV_DISABLE_UVAR_XKEY |
88
|
|
|
|
|
|
{ "HV_DISABLE_UVAR_XKEY", 20 }, |
89
|
|
|
|
|
|
#endif |
90
|
|
|
|
|
|
#ifndef HV_FETCH_ISSTORE |
91
|
|
|
|
|
|
{ "HV_FETCH_ISSTORE", 16 }, |
92
|
|
|
|
|
|
#endif |
93
|
|
|
|
|
|
#ifndef HV_FETCH_ISEXISTS |
94
|
|
|
|
|
|
{ "HV_FETCH_ISEXISTS", 17 }, |
95
|
|
|
|
|
|
#endif |
96
|
|
|
|
|
|
#ifndef HV_FETCH_LVALUE |
97
|
|
|
|
|
|
{ "HV_FETCH_LVALUE", 15 }, |
98
|
|
|
|
|
|
#endif |
99
|
|
|
|
|
|
#ifndef HV_FETCH_JUST_SV |
100
|
|
|
|
|
|
{ "HV_FETCH_JUST_SV", 16 }, |
101
|
|
|
|
|
|
#endif |
102
|
|
|
|
|
|
#ifndef G_SCALAR |
103
|
|
|
|
|
|
{ "G_SCALAR", 8 }, |
104
|
|
|
|
|
|
#endif |
105
|
|
|
|
|
|
#ifndef G_ARRAY |
106
|
|
|
|
|
|
{ "G_ARRAY", 7 }, |
107
|
|
|
|
|
|
#endif |
108
|
|
|
|
|
|
#ifndef G_VOID |
109
|
|
|
|
|
|
{ "G_VOID", 6 }, |
110
|
|
|
|
|
|
#endif |
111
|
|
|
|
|
|
#ifndef G_DISCARD |
112
|
|
|
|
|
|
{ "G_DISCARD", 9 }, |
113
|
|
|
|
|
|
#endif |
114
|
|
|
|
|
|
#ifndef G_EVAL |
115
|
|
|
|
|
|
{ "G_EVAL", 6 }, |
116
|
|
|
|
|
|
#endif |
117
|
|
|
|
|
|
#ifndef G_NOARGS |
118
|
|
|
|
|
|
{ "G_NOARGS", 8 }, |
119
|
|
|
|
|
|
#endif |
120
|
|
|
|
|
|
#ifndef G_KEEPERR |
121
|
|
|
|
|
|
{ "G_KEEPERR", 9 }, |
122
|
|
|
|
|
|
#endif |
123
|
|
|
|
|
|
#ifndef G_NODEBUG |
124
|
|
|
|
|
|
{ "G_NODEBUG", 9 }, |
125
|
|
|
|
|
|
#endif |
126
|
|
|
|
|
|
#ifndef G_METHOD |
127
|
|
|
|
|
|
{ "G_METHOD", 8 }, |
128
|
|
|
|
|
|
#endif |
129
|
|
|
|
|
|
#ifndef G_FAKINGEVAL |
130
|
|
|
|
|
|
{ "G_FAKINGEVAL", 12 }, |
131
|
|
|
|
|
|
#endif |
132
|
|
|
|
|
|
#ifndef IS_NUMBER_IN_UV |
133
|
|
|
|
|
|
{ "IS_NUMBER_IN_UV", 15 }, |
134
|
|
|
|
|
|
#endif |
135
|
|
|
|
|
|
#ifndef IS_NUMBER_GREATER_THAN_UV_MAX |
136
|
|
|
|
|
|
{ "IS_NUMBER_GREATER_THAN_UV_MAX", 29 }, |
137
|
|
|
|
|
|
#endif |
138
|
|
|
|
|
|
#ifndef IS_NUMBER_NOT_INT |
139
|
|
|
|
|
|
{ "IS_NUMBER_NOT_INT", 17 }, |
140
|
|
|
|
|
|
#endif |
141
|
|
|
|
|
|
#ifndef IS_NUMBER_NEG |
142
|
|
|
|
|
|
{ "IS_NUMBER_NEG", 13 }, |
143
|
|
|
|
|
|
#endif |
144
|
|
|
|
|
|
#ifndef IS_NUMBER_INFINITY |
145
|
|
|
|
|
|
{ "IS_NUMBER_INFINITY", 18 }, |
146
|
|
|
|
|
|
#endif |
147
|
|
|
|
|
|
#ifndef IS_NUMBER_NAN |
148
|
|
|
|
|
|
{ "IS_NUMBER_NAN", 13 }, |
149
|
|
|
|
|
|
#endif |
150
|
|
|
|
|
|
{ NULL, 0 } }; |
151
|
|
|
|
|
|
struct iv_s {const char *name; I32 namelen; IV value;}; |