Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!newsfeed.rice.edu!news.sesqui.net!uuneo.neosoft.com!nmtigw!peter
From: peter@nmti.com (Peter da Silva)
Subject: Re: A Little More Smalltalk...
Message-ID: <id.H2NK1.QV9@nmti.com>
Sender: peter@nmti.com (peter da silva)
Organization: Network/development platform support, NMTI
References: <id.8ZLK1.8L9@nmti.com> <1995Jun10.125018.811@mzo.toppoint.de>
Date: Sat, 10 Jun 1995 16:12:32 GMT
Lines: 48

In article <1995Jun10.125018.811@mzo.toppoint.de>,
Michael Zoerner <mzoer@mzo.toppoint.de> wrote:
> I ran into this too. I found a glitch in the VM code (interp.c?). 
> There is something like this:

>     case Branch:
>        bytePointer = bp[bytePointer++];

Classic side effect problem. Trouble is, it doesn't seem to help the Alpha
implementation:

% ./st
3711 objects in image
-> 2000
,2,0
-> 200
200
-> 2000 class
LargeInt
-> 200 class
SmallInt
-> 999 class
SmallInt
-> 1000 class
LargeInt

METHOD LargeInt
printString | r |
        negative ifTrue: [ r <- '- ' ]
                ifFalse: [ r <- '' ].
        values reverseDo: [:x | r <- r + ',' + x printString ].
        ^ r
!

What the hell is this in aid of? Ah! I see... it's trying to print:

2,000

and the code is just plain broken in the image. It also means he's using
arrays of integers less than 1000 for LargeInt. Bletch. At least I know
where to look now. Hmmmm... lots of broken stuff here. There's no
division with large ints at all yet. Oh well, like he says it's a work in
progress.
-- 
Peter da Silva    (NIC: PJD2)                             `-_-'
Network Management Technology Incorporated                 'U`
1601 Industrial Blvd.     Sugar Land, TX  77478  USA
+1 713 274 5180                                "Har du kramat din varg idag?"
