Skip to content

Commit

Permalink
Finally kill off share_lex
Browse files Browse the repository at this point in the history
Metasubs no longer need to hold a runtime reference to the protopad, any more
than any other pad.  -16K testsuite
  • Loading branch information
sorear committed Aug 17, 2010
1 parent 465c16d commit 992bd0e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
8 changes: 0 additions & 8 deletions CgOp.pm
Expand Up @@ -502,10 +502,6 @@ use warnings;
}
}

sub share_lex {
scopedlex($_[0], protolget($_[0]));
}

sub sub_obj {
CgOp::Primitive->new(op => [ 'sub_obj', $_[0]->csname ]);
}
Expand All @@ -516,10 +512,6 @@ use warnings;
CgOp::Primitive->new(op => [ 'proto_var', $_[0] ], zyg => [ $_[1] ]);
}

sub protolget {
CgOp::Primitive->new(op => [ 'protolget', $_[0] ]);
}

sub return {
$_[0] ?
CgOp::Primitive->new(op => [ 'return', 1 ], zyg => [ $_[0] ]) :
Expand Down
16 changes: 1 addition & 15 deletions CodeGen.pm
Expand Up @@ -278,12 +278,6 @@ use 5.010;
}
}

sub pop_let {
my ($self, $which) = @_;
$self->peek_let($which);
$self->drop_let($which);
}

sub drop_let {
my ($self, $which) = @_;
die "Let consistency error" if $which ne $self->letstack->[-1];
Expand Down Expand Up @@ -423,12 +417,6 @@ use 5.010;
$self->_push('Variable', "th.pos[$num]");
}

sub protolget {
my ($self, $name) = @_;
$self->_push('object', "th.info.proto.lex[" . qm($name) . "]");
$self->cast('Variable');
}

sub call_method {
my ($self, $nv, $name, $numargs) = @_;
my @args = reverse map { ($self->_popn(1))[0] }
Expand Down Expand Up @@ -627,10 +615,8 @@ use 5.010;
$self->_emit($body->csname . "_info.mo = ((DynObject)$cl).klass");
}

$self->pop_let('protopad');
$self->drop_let('protopad');
pop @{ $self->bodies };
my ($pp) = $self->_popn(1);
$self->_emit($body->csname . "_info.proto = $pp");
}

sub sub_obj {
Expand Down
2 changes: 0 additions & 2 deletions Kernel.cs
Expand Up @@ -89,8 +89,6 @@ public class SubInfo {
public Dictionary<string, object> hints;
// maybe should be a hint
public LAD ltm;
// needs to go, currently used for some share stuff
public Frame proto;

public void PutHint(string name, object val) {
if (hints == null)
Expand Down

0 comments on commit 992bd0e

Please sign in to comment.