| 1 | package Ref::Store::XS::Key; | ||||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 2 | ▶ | use Ref::Store::Common; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 2 | ▶ | use Ref::Store::XS::cfunc; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | |||||||||||||||
| 7 | 2 | *new = \&HRXSK_new; | |||||||||||||
| 8 | 2 | *kstring = \&HRXSK_kstring; | |||||||||||||
| 9 | 2 | *prefix_len = \&HRXSK_prefix_len; | |||||||||||||
| 10 | |||||||||||||||
| 11 | 0 | ▶ | sub weaken_encapsulated { } | ||||||||||||
|
Subroutine
weaken_encapsulated: not called CC=1 SCAR=0.0
| |||||||||||||||
| 12 | 18 | ▶ | sub unlink_value { } | ||||||||||||
|
Subroutine
unlink_value: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | 0 | ▶ | sub link_value { } | ||||||||||||
|
Subroutine
link_value: not called CC=1 SCAR=0.0
| |||||||||||||||
| 14 | 0 | ▶ | sub ithread_predup {} | ||||||||||||
|
Subroutine
ithread_predup: not called CC=1 SCAR=0.0
| |||||||||||||||
| 15 | 0 | ▶ | sub ukey {} | ||||||||||||
|
Subroutine
ukey: not called CC=1 SCAR=0.0
| |||||||||||||||
| 16 | |||||||||||||||
| 17 | 2 | *ithread_postdup = \&HRXSK_ithread_postdup; | |||||||||||||
| 18 | |||||||||||||||
| 19 | package Ref::Store::XS::Key::Encapsulating; | ||||||||||||||
| 20 | 2 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 21 | 2 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 22 | 2 | ▶ | use Ref::Store::XS::cfunc; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 23 | |||||||||||||||
| 24 | 14 | ▶ | sub unlink_value { } | ||||||||||||
|
Subroutine
unlink_value: called CC=1 SCAR=0.0
| |||||||||||||||
| 25 | |||||||||||||||
| 26 | 2 | *new = \&HRXSK_encap_new; | |||||||||||||
| 27 | 2 | *weaken_encapsulated = \&HRXSK_encap_weaken; | |||||||||||||
| 28 | |||||||||||||||
| 29 | #NOOP: | ||||||||||||||
| 30 | #*link_value = \&HRXSK_encap_link_value; | ||||||||||||||
| 31 | |||||||||||||||
| 32 | 2 | *kstring = \&HRXSK_encap_kstring; | |||||||||||||
| 33 | 2 | *prefix_len = \&HRXSK_prefix_len; | |||||||||||||
| 34 | |||||||||||||||
| 35 | 2 | *ithread_predup = \&HRXSK_encap_ithread_predup; | |||||||||||||
| 36 | 2 | *ithread_postdup = \&HRXSK_encap_ithread_postdup; | |||||||||||||
| 37 | |||||||||||||||
| 38 | 2 | *ukey = \&HRXSK_encap_getencap; | |||||||||||||
| 39 | |||||||||||||||
| 40 | 0 | ▶ | sub dump { | ||||||||||||
|
Subroutine
dump: not called CC=1 SCAR=6.9
| |||||||||||||||
| 41 | 0 | my ($self,$hrd) = @_; | |||||||||||||
| 42 | 0 | $hrd->iprint("ENCAP: %s", $hrd->fmt_ptr($self->HRXSK_encap_getencap)); | |||||||||||||
| 43 | } | ||||||||||||||
| 44 | |||||||||||||||
| 45 | |||||||||||||||
| 46 | |||||||||||||||
| 47 | package Ref::Store::XS::Attribute; | ||||||||||||||
| 48 | 2 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 49 | 2 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 50 | 2 | ▶ | use Ref::Store::XS::cfunc; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 51 | |||||||||||||||
| 52 | 2 | *unlink_value = \&HRXSATTR_unlink_value; | |||||||||||||
| 53 | 2 | *get_hash = \&HRXSATTR_get_hash; | |||||||||||||
| 54 | 2 | *kstring = \&HRXSATTR_kstring; | |||||||||||||
| 55 | 2 | *prefix_len = \&HRXSATTR_prefix_len; | |||||||||||||
| 56 | 2 | *ithread_predup = \&HRXSATTR_ithread_predup; | |||||||||||||
| 57 | 2 | *ithread_postdup= \&HRXSATTR_ithread_postdup; | |||||||||||||
| 58 | |||||||||||||||
| 59 | 0 | ▶ | sub ukey { } | ||||||||||||
|
Subroutine
ukey: not called CC=1 SCAR=0.0
| |||||||||||||||
| 60 | |||||||||||||||
| 61 | package Ref::Store::XS::Attribute::Encapsulating; | ||||||||||||||
| 62 | 2 | ▶ | use Ref::Store::XS::cfunc; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 63 | 2 | our @ISA = qw(Ref::Store::XS::Attribute); | |||||||||||||
| 64 | 2 | *ukey = \&HRXSATTR_encap_ukey; | |||||||||||||
| 65 | |||||||||||||||
| 66 | package Ref::Store::XS; | ||||||||||||||
| 67 | 2 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 68 | 2 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 69 | 2 | ▶ | use base qw(Ref::Store); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 70 | 2 | ▶ | use Ref::Store::XS::cfunc; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 71 | 2 | ▶ | use Log::Fu; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 72 | |||||||||||||||
| 73 | #These two lines completely override the perl store/fetch code and utilize | ||||||||||||||
| 74 | #pure C! - double the speed | ||||||||||||||
| 75 | |||||||||||||||
| 76 | 2 | *table_init = \&HRA_table_init; | |||||||||||||
| 77 | |||||||||||||||
| 78 | 2 | *store = *store_sk = \&HRA_store_sk; | |||||||||||||
| 79 | 2 | *fetch = *fetch_sk = \&HRA_fetch_sk; | |||||||||||||
| 80 | 2 | *store_kt = \&HRA_store_kt; | |||||||||||||
| 81 | |||||||||||||||
| 82 | 2 | *store_a = \&HRA_store_a; | |||||||||||||
| 83 | 2 | *fetch_a = \&HRA_fetch_a; | |||||||||||||
| 84 | 2 | *dissoc_a = \&HRA_dissoc_a; | |||||||||||||
| 85 | 2 | *unlink_a = \&HRA_unlink_a; | |||||||||||||
| 86 | 2 | *attr_get = \&HRA_attr_get; | |||||||||||||
| 87 | 2 | *ithread_store_lookup_info = \&HRA_ithread_store_lookup_info; | |||||||||||||
| 88 | |||||||||||||||
| 89 | |||||||||||||||
| 90 | 0 | ▶ | sub new_key { | ||||||||||||
|
Subroutine
new_key: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||
| 91 | 0 | my ($self,$scalar) = @_; | |||||||||||||
| 92 | 0 | ▶ | if(!ref $scalar) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 93 | 0 | return HRXSK_new('Ref::Store::XS::Key', | |||||||||||||
| 94 | $scalar, $self->forward, $self->scalar_lookup); | ||||||||||||||
| 95 | } else { | ||||||||||||||
| 96 | 0 | return HRXSK_encap_new('Ref::Store::XS::Key::Encapsulating', | |||||||||||||
| 97 | $scalar, $self, $self->forward, | ||||||||||||||
| 98 | $self->scalar_lookup); | ||||||||||||||
| 99 | } | ||||||||||||||
| 100 | } | ||||||||||||||
| 101 | |||||||||||||||
| 102 | 0 | ▶ | sub dref_add_ptr { | ||||||||||||
|
Subroutine
dref_add_ptr: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 103 | 0 | my ($self,$value,$hashref) = @_; | |||||||||||||
| 104 | 0 | HR_PL_add_action_ptr($value, $hashref); | |||||||||||||
| 105 | } | ||||||||||||||
| 106 | |||||||||||||||
| 107 | 0 | ▶ | sub dref_add_str { | ||||||||||||
|
Subroutine
dref_add_str: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 108 | 0 | my ($self,$value,$hashref,$str) = @_; | |||||||||||||
| 109 | 0 | HR_PL_add_action_str($value,$hashref,$str); | |||||||||||||
| 110 | } | ||||||||||||||
| 111 | |||||||||||||||
| 112 | 28 | ▶ | sub dref_del_ptr { | ||||||||||||
|
Subroutine
dref_del_ptr: called CC=3 SCAR=13.3
Pod
undocumented
| |||||||||||||||
| 113 | 28 | my ($self,$value,$hashref,$arg) = @_; | |||||||||||||
| 114 | 28 | ▶ | if(@_ == 3) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 115 | 0 | HR_PL_del_action_container($value, $hashref); | |||||||||||||
| 116 | } elsif(@_ == 4) { | ||||||||||||||
| 117 | 28 | HR_PL_del_action_ptr($value, $hashref, $arg); | |||||||||||||
| 118 | } else { | ||||||||||||||
| 119 | 0 | die("Need either 2 or 3 arguments, got ", (scalar @_) - 1); | |||||||||||||
| 120 | } | ||||||||||||||
| 121 | } | ||||||||||||||
| 122 | |||||||||||||||
| 123 | |||||||||||||||
| 124 | 2 | 1; | |||||||||||||
| 125 | |||||||||||||||
| 126 | __END__ | ||||||||||||||