[plt-scheme] small question about mzscheme's source

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed May 5 11:38:44 EDT 2004

At Tue, 4 May 2004 10:57:41 +0200, "ifconfig" wrote:
> > A MzScheme fixnum is represented using 31-bit two's complement. If you
> > shift a 1 left by 30 bits, you get the representation of -2^30 instead
> > of 2^31.
> 
> 
> If that is the case, why do you shift it 31-bits if it's a rightshift?
> (#define MAX_SHIFT_EVER 32)

You're correct -- right-shifting by 30 bits would be enough, but it was
easier to conclude that 31 bits was safe.

> Is the bytecode scheme-based or register-machine-based?
> In other words, is it a sequencial program bytecode, or a bytecode in which
> everything has a value?

I'm not sure I understand the options, but the bytecode is really
something like an AST, but with stack offsets instead of variable
names, etc. Unlike the JVM bytecode format, it's not a flat array of
numbers.

Matthew



Posted on the users mailing list.