Commit d30c7303 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

Add comments to undocumented functions and fix other comments

Grouping a couple of small, non-functional fixes:

- add a comment to GetStackParameterDelta
- small typo fixes to a couple of places I saw while reading related
code

Bug: v8:11879
Change-Id: I8566c9778fd6268b08ea3aefbdaa84ef894bcd35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2997922Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75490}
parent 4cca3ccd
...@@ -3079,7 +3079,7 @@ void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size, ...@@ -3079,7 +3079,7 @@ void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
// The stack on entry holds the arguments and the receiver, with the receiver // The stack on entry holds the arguments and the receiver, with the receiver
// at the highest address: // at the highest address:
// //
// sp]argc-1]: receiver // sp[argc-1]: receiver
// sp[argc-2]: arg[argc-2] // sp[argc-2]: arg[argc-2]
// ... ... // ... ...
// sp[1]: arg[1] // sp[1]: arg[1]
......
...@@ -395,6 +395,8 @@ class V8_EXPORT_PRIVATE CallDescriptor final ...@@ -395,6 +395,8 @@ class V8_EXPORT_PRIVATE CallDescriptor final
const char* debug_name() const { return debug_name_; } const char* debug_name() const { return debug_name_; }
// Difference between the number of parameter slots of *this* and
// *tail_caller* (callee minus caller).
int GetStackParameterDelta(const CallDescriptor* tail_caller) const; int GetStackParameterDelta(const CallDescriptor* tail_caller) const;
// Returns the offset to the area below the parameter slots on the stack, // Returns the offset to the area below the parameter slots on the stack,
......
...@@ -205,7 +205,7 @@ TEST_F(LinkageTailCall, MatchingStackParameters) { ...@@ -205,7 +205,7 @@ TEST_F(LinkageTailCall, MatchingStackParameters) {
LocationSignature locations1(1, 3, location_array); LocationSignature locations1(1, 3, location_array);
CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1);
// Caller // Callee
LocationSignature locations2(1, 3, location_array); LocationSignature locations2(1, 3, location_array);
CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1);
...@@ -231,7 +231,7 @@ TEST_F(LinkageTailCall, NonMatchingStackParameters) { ...@@ -231,7 +231,7 @@ TEST_F(LinkageTailCall, NonMatchingStackParameters) {
LocationSignature locations1(1, 3, location_array); LocationSignature locations1(1, 3, location_array);
CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1);
// Caller // Callee
LocationSignature locations2(1, 3, location_array); LocationSignature locations2(1, 3, location_array);
CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1);
...@@ -258,7 +258,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCallerRegisters) { ...@@ -258,7 +258,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCallerRegisters) {
LocationSignature locations1(1, 5, location_array); LocationSignature locations1(1, 5, location_array);
CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1);
// Caller // Callee
LocationSignature locations2(1, 3, location_array); LocationSignature locations2(1, 3, location_array);
CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1);
...@@ -285,7 +285,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCalleeRegisters) { ...@@ -285,7 +285,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCalleeRegisters) {
LocationSignature locations1(1, 3, location_array); LocationSignature locations1(1, 3, location_array);
CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1);
// Caller // Callee
LocationSignature locations2(1, 5, location_array); LocationSignature locations2(1, 5, location_array);
CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc2 = NewStandardCallDescriptor(&locations1);
...@@ -313,7 +313,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCallerRegistersAndStack) { ...@@ -313,7 +313,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCallerRegistersAndStack) {
LocationSignature locations1(1, 5, location_array); LocationSignature locations1(1, 5, location_array);
CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1);
// Caller // Callee
LocationSignature locations2(1, 3, location_array); LocationSignature locations2(1, 3, location_array);
CallDescriptor* desc2 = NewStandardCallDescriptor(&locations2); CallDescriptor* desc2 = NewStandardCallDescriptor(&locations2);
...@@ -343,7 +343,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCalleeRegistersAndStack) { ...@@ -343,7 +343,7 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCalleeRegistersAndStack) {
LocationSignature locations1(1, 3, location_array); LocationSignature locations1(1, 3, location_array);
CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1); CallDescriptor* desc1 = NewStandardCallDescriptor(&locations1);
// Caller // Callee
LocationSignature locations2(1, 5, location_array); LocationSignature locations2(1, 5, location_array);
CallDescriptor* desc2 = NewStandardCallDescriptor(&locations2); CallDescriptor* desc2 = NewStandardCallDescriptor(&locations2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment