src/xs/Scope.cc

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 11 / 22 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 73.1% 30 / 41 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« src/xs/KeyProxy.cc ↑ Summary t/typemap/object/single.xsi »
1 #include "Scope.h"
2 #include "Simple.h"
3  
4 namespace xs {
5  
6 using panda::string_view;
7  
8 4 void Scope::Hints::set (string_view name, const Sv& value) {
9 4 ▶ auto copy = Sv::create();
Branch: 1 branch
BranchTrueFalseTotal
auto copy = Sv::create(); 4 0 4
10 4 ▶ sv_setsv(copy, value);
Branch: 1 branch
BranchTrueFalseTotal
sv_setsv(copy, value); 4 0 4
11  
12 4 auto hv = GvHV(PL_hintgv);
13 4 ▶ auto he = hv_store_ent(hv, Simple(name), copy.detach(), 0);
Branch: 2 branches
BranchTrueFalseTotal
auto he = hv_store_ent(hv, Simple(name), copy.detach(), 0); 4 0 4
auto he = hv_store_ent(hv, Simple(name), copy.detach(), 0); 4 0 4
14 4 PL_hints |= HINT_LOCALIZE_HH;
15  
16 4 ▶ if (he) SvSETMAGIC(HeVAL(he));
Branch: 3 branches
BranchTrueFalseTotal
if (he) SvSETMAGIC(HeVAL(he)); 4 0 4
if (he) SvSETMAGIC(HeVAL(he)); 4 0 4
if (he) SvSETMAGIC(HeVAL(he)); 4 0 4
17 4 }
18  
19 4 void Scope::Hints::remove (string_view name) {
20 4 PL_hints |= HINT_LOCALIZE_HH;
21 4 ▶ Hash hints = GvHV(PL_hintgv);
Branch: 1 branch
BranchTrueFalseTotal
Hash hints = GvHV(PL_hintgv); 4 0 4
22 4 ▶ hints.erase(name);
Branch: 1 branch
BranchTrueFalseTotal
hints.erase(name); 4 0 4
23 4 }
24  
25 3 Hash Scope::Hints::get () {
26 3 return Hash::noinc(cop_hints_2hv(PL_curcop, 0));
27 }
28  
29 1 Scalar Scope::Hints::get_ct (string_view name) {
30 1 ▶ Hash hints = GvHV(PL_hintgv);
Branch: 1 branch
BranchTrueFalseTotal
Hash hints = GvHV(PL_hintgv); 1 0 1
31 2 ▶ return hints[name];
Branch: 1 branch
BranchTrueFalseTotal
return hints[name]; 1 0 1
32 1 }
33  
34 }
« src/xs/KeyProxy.cc ↑ Summary t/typemap/object/single.xsi »