summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-05 11:30:31 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-05 11:30:31 +0000
commit69240efd70fee399a5232ed995c383b154000a08 (patch)
tree79c33453a3adc1fdccc1d469a75b1aeb49898614 /dump.c
parentbdd9a1b1ec56a0b6b7d8b1b363138a8fbd3040e3 (diff)
downloadperl-69240efd70fee399a5232ed995c383b154000a08.tar.gz
BER is all very well, but it turns out that it's better to store the
offset as either a byte (if <256), or a 0 byte with a STRLEN before. "better" in that the reading can be inlined, and even then the object code is smaller (function calls have space overhead). So goodbye Perl_sv_read_offset() and hello SvOOK_offset(). p4raw-id: //depot/perl@32838
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index 9312bf4607..b4eaed8bb3 100644
--- a/dump.c
+++ b/dump.c
@@ -1576,10 +1576,13 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
}
if (type <= SVt_PVLV && !isGV_with_GP(sv)) {
if (SvPVX_const(sv)) {
- UV delta = SvOOK(sv) ? sv_read_offset(sv) : 0;
+ STRLEN delta;
if (SvOOK(sv)) {
+ SvOOK_offset(sv, delta);
Perl_dump_indent(aTHX_ level, file," OFFSET = %"UVuf"\n",
delta);
+ } else {
+ delta = 0;
}
Perl_dump_indent(aTHX_ level, file," PV = 0x%"UVxf" ", PTR2UV(SvPVX_const(sv)));
if (SvOOK(sv)) {