Refactored native trait inlining some more - added an optimized path to avoid copying...
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / String / inc.pm
index 156575a..bdbfb57 100644 (file)
@@ -18,15 +18,10 @@ sub _potential_value {
     return "( do { my \$val = $slot_access; \$val++ } )";
 }
 
-sub _inline_set_new_value {
-    my ( $self, $inv, $new ) = @_;
+sub _inline_optimized_set_new_value {
+    my ( $self, $inv, $new, $slot_access ) = @_;
 
-    return $self->SUPER::_inline_set_new_value(@_)
-        if $self->_value_needs_copy;
-
-    my $slot_access = $self->_inline_get($inv);
-
-    return "${slot_access}++";
+    return "${slot_access}++;";
 }
 
 1;