develooper Front page | perl.perl5.porters | Postings from February 2001

Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2)

From:
Ilya Zakharevich
Date:
February 15, 2001 15:00
Subject:
Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2)
Message ID:
20010215180023.A16663@math.ohio-state.edu
On Thu, Feb 15, 2001 at 10:54:57PM +0000, Nicholas Clark wrote:
> > I checked one line of the code only - one where the segfault is
> > happening on OS/2 (this segfault might be attributed to video drivers,
> > so might be not Perl fault).  This one line indicates that when NV is
> > used in the IV/Uv context, the converted value is not cached.
> > 
> > This line alone makes the approach deserving rejection.
> 
> I don't agree that it makes the *approach* deserving of rejection.
> The implementation, yes. (in that the implementation needs to be perfect)
> It was not intended never to cache the NV value if the NV value was
> calculated from the string.

perl5.6.0 -MDevel::Peek -wle '$a = shift; $b = $a+1; Dump $a' 12
Name "main::b" used only once: possible typo at -e line 1.
SV = PVNV(0x11aea8) at 0x13ea38
  REFCNT = 1
  FLAGS = (NOK,POK,pNOK,pPOK)
  IV = 0
  NV = 12
  PV = 0x1190a8 "12"\0
  CUR = 2
  LEN = 3

Enough said.

Ilya



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About