Skip to content

Commit

Permalink
No longer need to use lextypes in CgOp foo_lex
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jul 21, 2010
1 parent f0c3f28 commit 1334694
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions CgOp.pm
Expand Up @@ -308,25 +308,19 @@ use warnings;
}

sub share_lex {
prog(
lextypes($_[0], 'Variable'),
lexput(0, $_[0], protolget($_[0])));
lexput(0, $_[0], protolget($_[0]));
}

# the handling of @var here is quite wrong, but works for now
sub copy_lex {
my ($n, $l) = @_;
prog(
lextypes($n, 'Variable'),
lexput(0, $n, $l ? newrwlistvar(fetch(protolget($_[0])))
: newrwscalar(fetch(protolget($_[0])))));
lexput(0, $n, $l ? newrwlistvar(fetch(protolget($_[0])))
: newrwscalar(fetch(protolget($_[0]))));
}

sub clone_lex {
prog(
lextypes($_[0], 'Variable'),
lexput(0, $_[0], methodcall(protolget($_[0]), "clone",
newscalar(callframe))));
lexput(0, $_[0], methodcall(protolget($_[0]), "clone",
newscalar(callframe)));
}

sub proto_var {
Expand Down

0 comments on commit 1334694

Please sign in to comment.