| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP/Instance.pm |
| Statements | Executed 15933 statements in 187ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 4144 | 4 | 3 | 65.3ms | 65.3ms | Class::MOP::Instance::set_slot_value |
| 137 | 1 | 1 | 25.1ms | 48.3ms | Class::MOP::Instance::BUILDARGS |
| 440 | 1 | 1 | 18.9ms | 24.5ms | Class::MOP::Instance::create_instance |
| 557 | 2 | 2 | 15.8ms | 24.7ms | Class::MOP::Instance::inline_set_slot_value |
| 744 | 4 | 1 | 12.4ms | 12.4ms | Class::MOP::Instance::inline_slot_access |
| 137 | 1 | 1 | 9.20ms | 65.5ms | Class::MOP::Instance::new |
| 154 | 1 | 1 | 4.17ms | 7.07ms | Class::MOP::Instance::inline_get_slot_value |
| 48 | 1 | 1 | 1.90ms | 1.90ms | Class::MOP::Instance::_new |
| 210 | 2 | 2 | 1.87ms | 1.87ms | Class::MOP::Instance::is_inlinable |
| 137 | 1 | 1 | 1.15ms | 1.15ms | Class::MOP::Instance::is_dependent_on_superclasses |
| 42 | 1 | 1 | 1.13ms | 1.95ms | Class::MOP::Instance::_set_mop_slot |
| 73 | 1 | 1 | 1.09ms | 1.09ms | Class::MOP::Instance::inline_create_instance |
| 31 | 1 | 1 | 903µs | 1.42ms | Class::MOP::Instance::inline_is_slot_initialized |
| 8 | 1 | 1 | 112µs | 112µs | Class::MOP::Instance::get_slot_value |
| 10 | 1 | 1 | 91µs | 91µs | Class::MOP::Instance::inline_get_is_lvalue |
| 1 | 1 | 1 | 70µs | 149µs | Class::MOP::Instance::clone_instance |
| 1 | 1 | 1 | 63µs | 79µs | Class::MOP::Instance::BEGIN@4 |
| 2 | 1 | 1 | 61µs | 89µs | Class::MOP::Instance::inline_weaken_slot_value |
| 1 | 1 | 1 | 53µs | 294µs | Class::MOP::Instance::BEGIN@13 |
| 1 | 1 | 1 | 53µs | 113µs | Class::MOP::Instance::BEGIN@5 |
| 2 | 1 | 1 | 40µs | 40µs | Class::MOP::Instance::is_slot_initialized |
| 1 | 1 | 1 | 37µs | 225µs | Class::MOP::Instance::BEGIN@7 |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::_clear_mop_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::_get_mop_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::_inline_clear_mop_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::_inline_get_mop_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::_inline_set_mop_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::deinitialize_all_slots |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::deinitialize_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::get_all_attributes |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::get_all_slots |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::initialize_all_slots |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::initialize_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::inline_deinitialize_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::inline_initialize_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::inline_rebless_instance_structure |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::inline_strengthen_slot_value |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::is_valid_slot |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::rebless_instance_structure |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::strengthen_slot_value |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Instance::weaken_slot_value |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | package Class::MOP::Instance; | ||||
| 3 | |||||
| 4 | 3 | 106µs | 2 | 96µs | # spent 79µs (63+16) within Class::MOP::Instance::BEGIN@4 which was called:
# once (63µs+16µs) by Class::MOP::Class::BEGIN@7 at line 4 # spent 79µs making 1 call to Class::MOP::Instance::BEGIN@4
# spent 16µs making 1 call to strict::import |
| 5 | 3 | 120µs | 2 | 174µs | # spent 113µs (53+61) within Class::MOP::Instance::BEGIN@5 which was called:
# once (53µs+61µs) by Class::MOP::Class::BEGIN@7 at line 5 # spent 113µs making 1 call to Class::MOP::Instance::BEGIN@5
# spent 61µs making 1 call to warnings::import |
| 6 | |||||
| 7 | 3 | 207µs | 2 | 412µs | # spent 225µs (37+187) within Class::MOP::Instance::BEGIN@7 which was called:
# once (37µs+187µs) by Class::MOP::Class::BEGIN@7 at line 7 # spent 225µs making 1 call to Class::MOP::Instance::BEGIN@7
# spent 188µs making 1 call to Exporter::import |
| 8 | |||||
| 9 | 1 | 5µs | our $VERSION = '1.11'; | ||
| 10 | 1 | 68µs | $VERSION = eval $VERSION; # spent 11µs executing statements in string eval | ||
| 11 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 12 | |||||
| 13 | 3 | 4.61ms | 2 | 294µs | # spent 294µs (53+241) within Class::MOP::Instance::BEGIN@13 which was called:
# once (53µs+241µs) by Class::MOP::Class::BEGIN@7 at line 13 # spent 294µs making 1 call to Class::MOP::Instance::BEGIN@13
# spent 241µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 241µs |
| 14 | |||||
| 15 | # make this not a valid method name, to avoid (most) attribute conflicts | ||||
| 16 | 1 | 3µs | my $RESERVED_MOP_SLOT = '<<MOP>>'; | ||
| 17 | |||||
| 18 | # spent 48.3ms (25.1+23.2) within Class::MOP::Instance::BUILDARGS which was called 137 times, avg 352µs/call:
# 137 times (25.1ms+23.2ms) by Class::MOP::Instance::new at line 39, avg 352µs/call | ||||
| 19 | 822 | 14.5ms | my ($class, @args) = @_; | ||
| 20 | |||||
| 21 | 137 | 824µs | if ( @args == 1 ) { # spent 824µs making 137 calls to Scalar::Util::blessed, avg 6µs/call | ||
| 22 | unshift @args, "associated_metaclass"; | ||||
| 23 | } elsif ( @args >= 2 && blessed($args[0]) && $args[0]->isa("Class::MOP::Class") ) { | ||||
| 24 | # compat mode | ||||
| 25 | my ( $meta, @attrs ) = @args; | ||||
| 26 | @args = ( associated_metaclass => $meta, attributes => \@attrs ); | ||||
| 27 | } | ||||
| 28 | |||||
| 29 | my %options = @args; | ||||
| 30 | # FIXME lazy_build | ||||
| 31 | 1006 | 9.98ms | 1006 | 22.3ms | $options{slots} ||= [ map { $_->slots } @{ $options{attributes} || [] } ]; # spent 22.3ms making 1006 calls to Class::MOP::Attribute::slots, avg 22µs/call |
| 32 | $options{slot_hash} = { map { $_ => undef } @{ $options{slots} } }; # FIXME lazy_build | ||||
| 33 | |||||
| 34 | return \%options; | ||||
| 35 | } | ||||
| 36 | |||||
| 37 | # spent 65.5ms (9.20+56.3) within Class::MOP::Instance::new which was called 137 times, avg 478µs/call:
# 137 times (9.20ms+56.3ms) by Class::MOP::Class::_create_meta_instance at line 620 of Class/MOP/Class.pm, avg 478µs/call | ||||
| 38 | 685 | 9.46ms | my $class = shift; | ||
| 39 | 137 | 48.3ms | my $options = $class->BUILDARGS(@_); # spent 48.3ms making 137 calls to Class::MOP::Instance::BUILDARGS, avg 352µs/call | ||
| 40 | |||||
| 41 | # FIXME replace with a proper constructor | ||||
| 42 | 137 | 6.99ms | my $instance = $class->_new(%$options); # spent 5.10ms making 89 calls to Moose::Meta::Instance::_new, avg 57µs/call
# spent 1.90ms making 48 calls to Class::MOP::Instance::_new, avg 39µs/call | ||
| 43 | |||||
| 44 | # FIXME weak_ref => 1, | ||||
| 45 | 137 | 1.04ms | weaken($instance->{'associated_metaclass'}); # spent 1.04ms making 137 calls to Scalar::Util::weaken, avg 8µs/call | ||
| 46 | |||||
| 47 | return $instance; | ||||
| 48 | } | ||||
| 49 | |||||
| 50 | # spent 1.90ms within Class::MOP::Instance::_new which was called 48 times, avg 39µs/call:
# 48 times (1.90ms+0s) by Class::MOP::Instance::new at line 42, avg 39µs/call | ||||
| 51 | 192 | 2.11ms | my $class = shift; | ||
| 52 | return Class::MOP::Class->initialize($class)->new_object(@_) | ||||
| 53 | if $class ne __PACKAGE__; | ||||
| 54 | |||||
| 55 | my $params = @_ == 1 ? $_[0] : {@_}; | ||||
| 56 | return bless { | ||||
| 57 | # NOTE: | ||||
| 58 | # I am not sure that it makes | ||||
| 59 | # sense to pass in the meta | ||||
| 60 | # The ideal would be to just | ||||
| 61 | # pass in the class name, but | ||||
| 62 | # that is placing too much of | ||||
| 63 | # an assumption on bless(), | ||||
| 64 | # which is *probably* a safe | ||||
| 65 | # assumption,.. but you can | ||||
| 66 | # never tell <:) | ||||
| 67 | 'associated_metaclass' => $params->{associated_metaclass}, | ||||
| 68 | 'attributes' => $params->{attributes}, | ||||
| 69 | 'slots' => $params->{slots}, | ||||
| 70 | 'slot_hash' => $params->{slot_hash}, | ||||
| 71 | } => $class; | ||||
| 72 | } | ||||
| 73 | |||||
| 74 | 441 | 6.99ms | 34 | 245µs | sub _class_name { $_[0]->{_class_name} ||= $_[0]->associated_metaclass->name } # spent 150µs making 17 calls to Class::MOP::Instance::associated_metaclass, avg 9µs/call
# spent 95µs making 17 calls to Class::MOP::Package::name, avg 6µs/call |
| 75 | |||||
| 76 | 17 | 223µs | sub associated_metaclass { $_[0]{'associated_metaclass'} } | ||
| 77 | |||||
| 78 | # spent 24.5ms (18.9+5.64) within Class::MOP::Instance::create_instance which was called 440 times, avg 56µs/call:
# 440 times (18.9ms+5.64ms) by Class::MOP::Class::_construct_instance at line 600 of Class/MOP/Class.pm, avg 56µs/call | ||||
| 79 | 880 | 18.3ms | my $self = shift; | ||
| 80 | 440 | 5.64ms | bless {}, $self->_class_name; # spent 5.64ms making 440 calls to Class::MOP::Instance::_class_name, avg 13µs/call | ||
| 81 | } | ||||
| 82 | |||||
| 83 | # spent 149µs (70+80) within Class::MOP::Instance::clone_instance which was called:
# once (70µs+80µs) by Class::MOP::Class::_clone_instance at line 680 of Class/MOP/Class.pm | ||||
| 84 | 2 | 102µs | my ($self, $instance) = @_; | ||
| 85 | 1 | 80µs | bless { %$instance }, $self->_class_name; # spent 80µs making 1 call to Class::MOP::Instance::_class_name | ||
| 86 | } | ||||
| 87 | |||||
| 88 | # operations on meta instance | ||||
| 89 | |||||
| 90 | sub get_all_slots { | ||||
| 91 | my $self = shift; | ||||
| 92 | return @{$self->{'slots'}}; | ||||
| 93 | } | ||||
| 94 | |||||
| 95 | sub get_all_attributes { | ||||
| 96 | my $self = shift; | ||||
| 97 | return @{$self->{attributes}}; | ||||
| 98 | } | ||||
| 99 | |||||
| 100 | sub is_valid_slot { | ||||
| 101 | my ($self, $slot_name) = @_; | ||||
| 102 | exists $self->{'slot_hash'}->{$slot_name}; | ||||
| 103 | } | ||||
| 104 | |||||
| 105 | # operations on created instances | ||||
| 106 | |||||
| 107 | # spent 112µs within Class::MOP::Instance::get_slot_value which was called 8 times, avg 14µs/call:
# 8 times (112µs+0s) by Class::MOP::Attribute::get_raw_value at line 274 of Class/MOP/Attribute.pm, avg 14µs/call | ||||
| 108 | 16 | 143µs | my ($self, $instance, $slot_name) = @_; | ||
| 109 | $instance->{$slot_name}; | ||||
| 110 | } | ||||
| 111 | |||||
| 112 | # spent 65.3ms within Class::MOP::Instance::set_slot_value which was called 4144 times, avg 16µs/call:
# 4002 times (63.0ms+0s) by Class::MOP::Attribute::_set_initial_slot_value at line 148 of Class/MOP/Attribute.pm, avg 16µs/call
# 98 times (1.54ms+0s) by Moose::Meta::Attribute::_set_initial_slot_value at line 522 of Moose/Meta/Attribute.pm, avg 16µs/call
# 42 times (819µs+0s) by Class::MOP::Instance::_set_mop_slot at line 174, avg 19µs/call
# 2 times (29µs+0s) by Class::MOP::Attribute::set_raw_value at line 266 of Class/MOP/Attribute.pm, avg 14µs/call | ||||
| 113 | 8288 | 78.3ms | my ($self, $instance, $slot_name, $value) = @_; | ||
| 114 | $instance->{$slot_name} = $value; | ||||
| 115 | } | ||||
| 116 | |||||
| 117 | sub initialize_slot { | ||||
| 118 | my ($self, $instance, $slot_name) = @_; | ||||
| 119 | return; | ||||
| 120 | } | ||||
| 121 | |||||
| 122 | sub deinitialize_slot { | ||||
| 123 | my ( $self, $instance, $slot_name ) = @_; | ||||
| 124 | delete $instance->{$slot_name}; | ||||
| 125 | } | ||||
| 126 | |||||
| 127 | sub initialize_all_slots { | ||||
| 128 | my ($self, $instance) = @_; | ||||
| 129 | foreach my $slot_name ($self->get_all_slots) { | ||||
| 130 | $self->initialize_slot($instance, $slot_name); | ||||
| 131 | } | ||||
| 132 | } | ||||
| 133 | |||||
| 134 | sub deinitialize_all_slots { | ||||
| 135 | my ($self, $instance) = @_; | ||||
| 136 | foreach my $slot_name ($self->get_all_slots) { | ||||
| 137 | $self->deinitialize_slot($instance, $slot_name); | ||||
| 138 | } | ||||
| 139 | } | ||||
| 140 | |||||
| 141 | # spent 40µs within Class::MOP::Instance::is_slot_initialized which was called 2 times, avg 20µs/call:
# 2 times (40µs+0s) by Class::MOP::Attribute::has_value at line 282 of Class/MOP/Attribute.pm, avg 20µs/call | ||||
| 142 | 4 | 51µs | my ($self, $instance, $slot_name, $value) = @_; | ||
| 143 | exists $instance->{$slot_name}; | ||||
| 144 | } | ||||
| 145 | |||||
| 146 | sub weaken_slot_value { | ||||
| 147 | my ($self, $instance, $slot_name) = @_; | ||||
| 148 | weaken $instance->{$slot_name}; | ||||
| 149 | } | ||||
| 150 | |||||
| 151 | sub strengthen_slot_value { | ||||
| 152 | my ($self, $instance, $slot_name) = @_; | ||||
| 153 | $self->set_slot_value($instance, $slot_name, $self->get_slot_value($instance, $slot_name)); | ||||
| 154 | } | ||||
| 155 | |||||
| 156 | sub rebless_instance_structure { | ||||
| 157 | my ($self, $instance, $metaclass) = @_; | ||||
| 158 | |||||
| 159 | # we use $_[1] here because of t/306_rebless_overload.t regressions on 5.8.8 | ||||
| 160 | bless $_[1], $metaclass->name; | ||||
| 161 | } | ||||
| 162 | |||||
| 163 | # spent 1.15ms within Class::MOP::Instance::is_dependent_on_superclasses which was called 137 times, avg 8µs/call:
# 137 times (1.15ms+0s) by Class::MOP::Class::_create_meta_instance at line 625 of Class/MOP/Class.pm, avg 8µs/call | ||||
| 164 | 137 | 1.50ms | return; # for meta instances that require updates on inherited slot changes | ||
| 165 | } | ||||
| 166 | |||||
| 167 | sub _get_mop_slot { | ||||
| 168 | my ($self, $instance) = @_; | ||||
| 169 | $self->get_slot_value($instance, $RESERVED_MOP_SLOT); | ||||
| 170 | } | ||||
| 171 | |||||
| 172 | # spent 1.95ms (1.13+818µs) within Class::MOP::Instance::_set_mop_slot which was called 42 times, avg 46µs/call:
# 42 times (1.13ms+818µs) by Class::MOP::Class::_construct_instance at line 605 of Class/MOP/Class.pm, avg 46µs/call | ||||
| 173 | 84 | 1.02ms | my ($self, $instance, $value) = @_; | ||
| 174 | 42 | 819µs | $self->set_slot_value($instance, $RESERVED_MOP_SLOT, $value); # spent 819µs making 42 calls to Class::MOP::Instance::set_slot_value, avg 19µs/call | ||
| 175 | } | ||||
| 176 | |||||
| 177 | sub _clear_mop_slot { | ||||
| 178 | my ($self, $instance) = @_; | ||||
| 179 | $self->deinitialize_slot($instance, $RESERVED_MOP_SLOT); | ||||
| 180 | } | ||||
| 181 | |||||
| 182 | # inlinable operation snippets | ||||
| 183 | |||||
| 184 | 210 | 2.41ms | # spent 1.87ms within Class::MOP::Instance::is_inlinable which was called 210 times, avg 9µs/call:
# 126 times (1.18ms+0s) by Moose::Meta::Method::Accessor::_instance_is_inlinable at line 118 of Moose/Meta/Method/Accessor.pm, avg 9µs/call
# 84 times (684µs+0s) by Class::MOP::Attribute::_process_accessors at line 322 of Class/MOP/Attribute.pm, avg 8µs/call | ||
| 185 | |||||
| 186 | # spent 1.09ms within Class::MOP::Instance::inline_create_instance which was called 73 times, avg 15µs/call:
# 73 times (1.09ms+0s) by Class::MOP::Class::inline_create_instance at line 634 of Class/MOP/Class.pm, avg 15µs/call | ||||
| 187 | 146 | 1.31ms | my ($self, $class_variable) = @_; | ||
| 188 | 'bless {} => ' . $class_variable; | ||||
| 189 | } | ||||
| 190 | |||||
| 191 | # spent 12.4ms within Class::MOP::Instance::inline_slot_access which was called 744 times, avg 17µs/call:
# 557 times (8.92ms+0s) by Class::MOP::Instance::inline_set_slot_value at line 205, avg 16µs/call
# 154 times (2.90ms+0s) by Class::MOP::Instance::inline_get_slot_value at line 200, avg 19µs/call
# 31 times (518µs+0s) by Class::MOP::Instance::inline_is_slot_initialized at line 219, avg 17µs/call
# 2 times (28µs+0s) by Class::MOP::Instance::inline_weaken_slot_value at line 224, avg 14µs/call | ||||
| 192 | 1488 | 16.0ms | my ($self, $instance, $slot_name) = @_; | ||
| 193 | sprintf q[%s->{"%s"}], $instance, quotemeta($slot_name); | ||||
| 194 | } | ||||
| 195 | |||||
| 196 | 10 | 126µs | # spent 91µs within Class::MOP::Instance::inline_get_is_lvalue which was called 10 times, avg 9µs/call:
# 10 times (91µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::_inline_get_is_lvalue at line 172 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 9µs/call | ||
| 197 | |||||
| 198 | # spent 7.07ms (4.17+2.90) within Class::MOP::Instance::inline_get_slot_value which was called 154 times, avg 46µs/call:
# 154 times (4.17ms+2.90ms) by Class::MOP::Attribute::inline_get at line 411 of Class/MOP/Attribute.pm, avg 46µs/call | ||||
| 199 | 308 | 3.61ms | my ($self, $instance, $slot_name) = @_; | ||
| 200 | 154 | 2.90ms | $self->inline_slot_access($instance, $slot_name); # spent 2.90ms making 154 calls to Class::MOP::Instance::inline_slot_access, avg 19µs/call | ||
| 201 | } | ||||
| 202 | |||||
| 203 | # spent 24.7ms (15.8+8.92) within Class::MOP::Instance::inline_set_slot_value which was called 557 times, avg 44µs/call:
# 463 times (12.9ms+7.28ms) by Class::MOP::Attribute::inline_set at line 419 of Class/MOP/Attribute.pm, avg 44µs/call
# 94 times (2.93ms+1.64ms) by Moose::Meta::Attribute::inline_set at line 699 of Moose/Meta/Attribute.pm, avg 49µs/call | ||||
| 204 | 1114 | 14.4ms | my ($self, $instance, $slot_name, $value) = @_; | ||
| 205 | 557 | 8.92ms | $self->inline_slot_access($instance, $slot_name) . " = $value", # spent 8.92ms making 557 calls to Class::MOP::Instance::inline_slot_access, avg 16µs/call | ||
| 206 | } | ||||
| 207 | |||||
| 208 | sub inline_initialize_slot { | ||||
| 209 | my ($self, $instance, $slot_name) = @_; | ||||
| 210 | return ''; | ||||
| 211 | } | ||||
| 212 | |||||
| 213 | sub inline_deinitialize_slot { | ||||
| 214 | my ($self, $instance, $slot_name) = @_; | ||||
| 215 | "delete " . $self->inline_slot_access($instance, $slot_name); | ||||
| 216 | } | ||||
| 217 | # spent 1.42ms (903µs+518µs) within Class::MOP::Instance::inline_is_slot_initialized which was called 31 times, avg 46µs/call:
# 31 times (903µs+518µs) by Class::MOP::Attribute::inline_has at line 428 of Class/MOP/Attribute.pm, avg 46µs/call | ||||
| 218 | 62 | 809µs | my ($self, $instance, $slot_name) = @_; | ||
| 219 | 31 | 518µs | "exists " . $self->inline_slot_access($instance, $slot_name); # spent 518µs making 31 calls to Class::MOP::Instance::inline_slot_access, avg 17µs/call | ||
| 220 | } | ||||
| 221 | |||||
| 222 | # spent 89µs (61+28) within Class::MOP::Instance::inline_weaken_slot_value which was called 2 times, avg 44µs/call:
# 2 times (61µs+28µs) by Moose::Meta::Attribute::inline_set at line 701 of Moose/Meta/Attribute.pm, avg 44µs/call | ||||
| 223 | 4 | 145µs | my ($self, $instance, $slot_name) = @_; | ||
| 224 | 2 | 28µs | sprintf "Scalar::Util::weaken( %s )", $self->inline_slot_access($instance, $slot_name); # spent 28µs making 2 calls to Class::MOP::Instance::inline_slot_access, avg 14µs/call | ||
| 225 | } | ||||
| 226 | |||||
| 227 | sub inline_strengthen_slot_value { | ||||
| 228 | my ($self, $instance, $slot_name) = @_; | ||||
| 229 | $self->inline_set_slot_value($instance, $slot_name, $self->inline_slot_access($instance, $slot_name)); | ||||
| 230 | } | ||||
| 231 | |||||
| 232 | sub inline_rebless_instance_structure { | ||||
| 233 | my ($self, $instance, $class_variable) = @_; | ||||
| 234 | "bless $instance => $class_variable"; | ||||
| 235 | } | ||||
| 236 | |||||
| 237 | sub _inline_get_mop_slot { | ||||
| 238 | my ($self, $instance) = @_; | ||||
| 239 | $self->inline_get_slot_value($instance, $RESERVED_MOP_SLOT); | ||||
| 240 | } | ||||
| 241 | |||||
| 242 | sub _inline_set_mop_slot { | ||||
| 243 | my ($self, $instance, $value) = @_; | ||||
| 244 | $self->inline_set_slot_value($instance, $RESERVED_MOP_SLOT, $value); | ||||
| 245 | } | ||||
| 246 | |||||
| 247 | sub _inline_clear_mop_slot { | ||||
| 248 | my ($self, $instance) = @_; | ||||
| 249 | $self->inline_deinitialize_slot($instance, $RESERVED_MOP_SLOT); | ||||
| 250 | } | ||||
| 251 | |||||
| 252 | 1 | 13µs | 1; | ||
| 253 | |||||
| 254 | __END__ |