Permalink
Browse files

Box constants exactly once

  • Loading branch information...
sorear committed Nov 21, 2010
1 parent 148689c commit 907d2774986ba96801bbc99713f1eb99b1ca4bd8
Showing with 3 additions and 3 deletions.
  1. +1 −1 perf/ctxmark.pl
  2. +2 −2 src/Op.pm
View
@@ -1,2 +1,2 @@
my $i = 0;
-$i++ until $i == 10000000;
+$i++ until $i == 100000;
View
@@ -451,7 +451,7 @@ use CgOp;
sub code {
my ($self, $body) = @_;
- CgOp::string_var($self->text);
+ CgOp::const(CgOp::string_var($self->text));
}
__PACKAGE__->meta->make_immutable;
@@ -651,7 +651,7 @@ use CgOp;
sub code {
my ($self, $body) = @_;
- CgOp::box('Num', CgOp::double($self->value));
+ CgOp::const(CgOp::box('Num', CgOp::double($self->value)));
}
__PACKAGE__->meta->make_immutable;

0 comments on commit 907d277

Please sign in to comment.