diff options
author | John Tobey <jtobey@john-edwin-tobey.org> | 2000-10-22 13:10:43 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-22 21:24:11 +0000 |
commit | de3f1649f32c093f94ded9e1969c53ca3166ec24 (patch) | |
tree | 56b4e377c393f4746f1dc032104aa8846c83d199 /ext | |
parent | eb3fce905f8436bbc374998ec8c7c34ce2b73e4e (diff) | |
download | perl-de3f1649f32c093f94ded9e1969c53ca3166ec24.tar.gz |
ripples from constsub patch
Message-Id: <m13nSOB-000FObC@feynman.localnet>
p4raw-id: //depot/perl@7403
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B.pm | 2 | ||||
-rw-r--r-- | ext/B/B.xs | 6 | ||||
-rw-r--r-- | ext/B/B/Deparse.pm | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm index dc4c4f7417..70c424ba1a 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -531,6 +531,8 @@ This method returns TRUE if the GP field of the GV is NULL. =item CvFLAGS +=item const_sv + =back =head2 B::HV METHODS diff --git a/ext/B/B.xs b/ext/B/B.xs index f1f0e65781..ec9e578020 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -1229,6 +1229,12 @@ U16 CvFLAGS(cv) B::CV cv +MODULE = B PACKAGE = B::CV PREFIX = cv_ + +B::SV +cv_const_sv(cv) + B::CV cv + MODULE = B PACKAGE = B::HV PREFIX = Hv diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 5c5c5eb9cb..7d1675290b 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -446,6 +446,11 @@ sub deparse_sub { # skip leavesub return $proto . "{\n\t" . $self->deparse($cv->ROOT->first, 0) . "\n\b}\n"; + } + my $sv = $cv->const_sv; + if ($$sv) { + # uh-oh. inlinable sub... format it differently + return $proto . "{ " . const($sv) . " }\n"; } else { # XSUB? return $proto . "{}\n"; } |