On Wed, Mar 18, 2009 at 3:41 AM, William Hesse <[email protected]> wrote:
> Yes, I can return from the loop.  But it makes the entire loop unroll.  I'm
> not sure this is a good idea.
> Also, unless we return from inside the loop, returning -1 (no_reg.code())
> instead of kNumRegisters just adds an extra test, since when we get the
> return value, we immediately compare it to kNumRegisters (or -1) immediately
> anyway.
> This function is just called from one site, and its purpose is to generate a
> tight inlined loop at that site.

Why don't you inline it there then? That seems much cleaner than
having a special purpose function with a slightly weird result. At the
very least, I think you need a comment to go along the
ScanForFreeRegister to explain why it's written the way it is.

Cheers,
Kasper

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to