From: bryce@kampjes.demon.co.uk> Date: Thu, 26 Jul 2007 11:43:43 +0100> To: exupery@lists.squeakfoundation.org> Subject: RE: Dynamically choosing a register> > > Do you mean for the cond to be evaluated at compile time in the> following?> > (def store-to-register (reg val)> (cond (reg)> ((number-that-means-eax) (store eax val)No, it can't be compile time since val will live in a field in instances of MethodContext. I can't know what val is until runtime. What I really want is a way to store in memory or another register some kind of reference to a register so that I would have the option in my VM that a caller can request the answer put right into the literal register of his choice.> If so you could just generate:> (mov t1 eax)> > Then the register allocator will try to allocate t1 in eax> and remove that move.> > BryceIs there any documentation on your mid and low level code generator? I would like to make a lisp-like language that targets it. This way I wouldn't have to make a compiler for every processor type, but I would have full power of the CPU and no dependencies on C.
_________________________________________________________________ See what you’re getting into…before you go there. http://newlivehotmail.com