danno, I am not satisfied with patch set 4 to address your comment for accessing
the first stack argument. So I worked out patchset 5 which introduces
StackArguments class (after declaration, we could access its elements like an
array, allowing negative index).

From reading the current codes, it seems that we could use a descriptor (similar like hydrogen stub descriptor) to initialize ParameterCount and StackArguments
to remove some boilerplate assembly codes. I leave it to future CL.

The StackArugments class is platform independent, currently is only used for
X64, maybe we could place it into code.h (ParameterCount lives there) or other
header file in the shared folder.


https://codereview.chromium.org/21123008/diff/28001/src/x64/code-stubs-x64.cc
File src/x64/code-stubs-x64.cc (right):

https://codereview.chromium.org/21123008/diff/28001/src/x64/code-stubs-x64.cc#newcode6039
src/x64/code-stubs-x64.cc:6039: StackArguments stack_arguments(2, 0,
kPointerSize);
There is a push instruction between the function start and the following
arguments access. So the disp is kPointerSize here. The disp is 0 for
all the other places.

https://codereview.chromium.org/21123008/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to