Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove dup and swap fossils
  • Loading branch information
sorear committed Jul 21, 2010
1 parent f4addf6 commit f2668ba
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions CodeGen.pm
Expand Up @@ -195,18 +195,6 @@ use 5.010;

# These functions are usable from user code, but still depend on volatiles.

sub swap {
my ($self) = @_;
$self->_undercheck(2);
$self->_overcheck(1);
my $n = $self->depth;

$self->_emit(sprintf "s%d = s%d", $n, $n-2);
$self->_emit(sprintf "s%d = s%d", $n-2, $n-1);
$self->_emit(sprintf "s%d = s%d", $n-1, $n);
@{ $self->stacktype }[-1,-2] = @{ $self->stacktype }[-2,-1];
}

sub push_let {
my ($self, $which) = @_;
my $var = "let!${which}!" . ($self->letdepths->{$which}++);
Expand Down Expand Up @@ -315,12 +303,6 @@ use 5.010;
$self->_push("Frame", $frame);
}

sub dup {
my ($self) = @_;
my $c = $self->_peek;
$self->_push($self->stacktype->[-1], $c);
}

sub drop {
my ($self) = @_;
$self->_pop;
Expand Down

0 comments on commit f2668ba

Please sign in to comment.