https://codereview.chromium.org/21123008/diff/1/src/x64/builtins-x64.cc
File src/x64/builtins-x64.cc (right):
https://codereview.chromium.org/21123008/diff/1/src/x64/builtins-x64.cc#newcode841
src/x64/builtins-x64.cc:841: __ movq(rdi, StackOperandForArgument(rax,
times_pointer_size,
Does this ever no use "time_pointer_size"? If so, you can reduce the
number of arguments to StackOperandForArgument to just a single
Register. You can also make the disp parameter a parameter with default
0.
https://codereview.chromium.org/21123008/diff/1/src/x64/ic-x64.cc
File src/x64/ic-x64.cc (right):
https://codereview.chromium.org/21123008/diff/1/src/x64/ic-x64.cc#newcode968
src/x64/ic-x64.cc:968: // Get the receiver of the function from the
stack; 1 ~ return address.
I don't understand the comment, what do you mean by "1 ~ return
address"? Just use StackOperandForReceiver as described below, then I
don't think you need a comment at all.
https://codereview.chromium.org/21123008/diff/1/src/x64/ic-x64.cc#newcode1306
src/x64/ic-x64.cc:1306: __ movq(rdx, StackOperandForArgument((argc + 1)
* kPointerSize));
Just to make it even prettier/more readible, how about introducing a
StackOperandForReceiver where you just pass argc, and it calls
StackOperandForArgument with (argc+1)?
https://codereview.chromium.org/21123008/diff/1/src/x64/macro-assembler-x64.h
File src/x64/macro-assembler-x64.h (right):
https://codereview.chromium.org/21123008/diff/1/src/x64/macro-assembler-x64.h#newcode1525
src/x64/macro-assembler-x64.h:1525: return Operand(rsp, disp +
kPCOnStackSize - kPointerSize);
Does it make sense to use an index rather than displacement? It would
simplify the usage sites. i.e.:
return Operand(rsp, (index * kPointerSize) + kPCOnStackSize -
kPointerSize + extra_disp);
extra_disp can be a default parameter with value 0
https://codereview.chromium.org/21123008/diff/1/src/x64/macro-assembler-x64.h#newcode1533
src/x64/macro-assembler-x64.h:1533: int32_t disp) {
Same here (index rather than displacement)?
https://codereview.chromium.org/21123008/diff/1/src/x64/stub-cache-x64.cc
File src/x64/stub-cache-x64.cc (right):
https://codereview.chromium.org/21123008/diff/1/src/x64/stub-cache-x64.cc#newcode2007
src/x64/stub-cache-x64.cc:2007: __ movq(index,
StackOperandForArgument((argc - 0) * kPointerSize));
just argc, I don't think the "- 0" makes anything clearer here
https://codereview.chromium.org/21123008/diff/1/src/x64/stub-cache-x64.cc#newcode2088
src/x64/stub-cache-x64.cc:2088: __ movq(index,
StackOperandForArgument((argc - 0) * kPointerSize));
just argc, I don't think the "- 0" makes anything clearer here
https://codereview.chromium.org/21123008/
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.