From cf25c36e515f95851080b7b4b4271838bab7a846 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Tue, 20 Jul 2010 22:05:34 -0700 Subject: [PATCH] Remove lexget and lexput as user facing ops --- CgOp.pm | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/CgOp.pm b/CgOp.pm index c9005126..9aa02a75 100644 --- a/CgOp.pm +++ b/CgOp.pm @@ -264,15 +264,6 @@ use warnings; zyg => [ @_ ]); } - sub lexput { - CgOp::Primitive->new(op => [ lexput => $_[0], $_[1] ], - zyg => [ $_[2] ]); - } - - sub lexget { - CgOp::Primitive->new(op => [ lexget => $_[0], $_[1] ]); - } - sub subcall { my ($sub, @args) = @_; CgOp::Primitive->new(op => [ 'call_sub', 1, scalar @args ], @@ -308,18 +299,18 @@ use warnings; } sub share_lex { - lexput(0, $_[0], protolget($_[0])); + scopedlex($_[0], protolget($_[0])); } # the handling of @var here is quite wrong, but works for now sub copy_lex { my ($n, $l) = @_; - lexput(0, $n, $l ? newrwlistvar(fetch(protolget($_[0]))) + scopedlex($n, $l ? newrwlistvar(fetch(protolget($_[0]))) : newrwscalar(fetch(protolget($_[0])))); } sub clone_lex { - lexput(0, $_[0], methodcall(protolget($_[0]), "clone", + scopedlex($_[0], methodcall(protolget($_[0]), "clone", newscalar(callframe))); }