This looks good enough to port to the other platforms.
http://codereview.chromium.org/7039036/diff/5001/src/ia32/builtins-ia32.cc File src/ia32/builtins-ia32.cc (right): http://codereview.chromium.org/7039036/diff/5001/src/ia32/builtins-ia32.cc#newcode1495 src/ia32/builtins-ia32.cc:1495: __ mov(edi, -1); // account for receiver On 2011/05/23 16:31:34, Mads Ager wrote:
On 2011/05/18 15:57:23, Kevin Millikin wrote: > Not your code, but this loop could also count down the number of
arguments
left > to push (after the current iteration, so it starts at arg_count to
include the
> receiver). I.e., do not mutate the base address and instead make
use of the
> mutated loop variable: > > __ mov(edi, ebx); > __ bind(©); > __ push(Operand(eax, edi, times_4)); > __ dec(edi); > __ j(not_sign, ©);
Won't this push the arguments in the wrong order? I would like to not
change
this in this change. This is getting big and hairy as it is.
It pushes in the right order (high to low addresses) but pushes the wrong block of stuff. I forgot the corresponding change to the base address. Leave it as is if you want. http://codereview.chromium.org/7039036/diff/5001/src/ia32/builtins-ia32.cc#newcode1514 src/ia32/builtins-ia32.cc:1514: // ebx = expected - actual. On 2011/05/23 16:31:34, Mads Ager wrote:
On 2011/05/18 15:57:23, Kevin Millikin wrote: > Then here, I think you can use more or less the same trick: > > __ lea(edi, Operand(ebp, eax, times_4, offset)); > __ bind(©); > __ push(Operand(edi, eax, times_4)); > __ dec(eax); > __ j(not_sign, ©); > > __ bind(&fill); > __ push(Immediate(masm->isolate()->factory()->undefined_value())); > __ dec(ebx); > __ j(not_sign, &fill);
Same as above. I think this will push arguments in the wrong order. I
would like
to leave as is for now.
It copies the wrong block of stuff. Sorry about that. I forgot the corresponding change to the base address (i.e., I double counted eax): __ bind(©); __ push(Operand(ebp, eax, times_4, offset)); __ dec(eax); __ j(not_sign, ©); __ bind(&fill); __ push(Immediate(masm->isolate()->factory()->undefined_value())); __ dec(ebx); __ j(not_sign, &fill); It's OK to leave it as you have it in this change, but I think the above is simpler than what's in the change. In this case, the CL doesn't really leave it as is anyway (the subtraction and negation is new, as is counting from a non-positive index up to zero rather than from zero up to a non-negative index). http://codereview.chromium.org/7039036/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
