OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_LINKAGE_H_ | 5 #ifndef V8_COMPILER_LINKAGE_H_ |
6 #define V8_COMPILER_LINKAGE_H_ | 6 #define V8_COMPILER_LINKAGE_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/frame.h" | 9 #include "src/compiler/frame.h" |
10 #include "src/compiler/operator.h" | 10 #include "src/compiler/operator.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 static LinkageLocation ForSavedCallerFunction() { | 79 static LinkageLocation ForSavedCallerFunction() { |
80 return ForCalleeFrameSlot((StandardFrameConstants::kCallerPCOffset - | 80 return ForCalleeFrameSlot((StandardFrameConstants::kCallerPCOffset - |
81 StandardFrameConstants::kFunctionOffset) / | 81 StandardFrameConstants::kFunctionOffset) / |
82 kPointerSize); | 82 kPointerSize); |
83 } | 83 } |
84 | 84 |
85 static LinkageLocation ConvertToTailCallerLocation( | 85 static LinkageLocation ConvertToTailCallerLocation( |
86 LinkageLocation caller_location, int stack_param_delta) { | 86 LinkageLocation caller_location, int stack_param_delta) { |
87 if (!caller_location.IsRegister()) { | 87 if (!caller_location.IsRegister()) { |
88 return LinkageLocation(STACK_SLOT, | 88 return LinkageLocation(STACK_SLOT, |
89 caller_location.GetLocation() - stack_param_delta); | 89 caller_location.GetLocation() + stack_param_delta); |
90 } | 90 } |
91 return caller_location; | 91 return caller_location; |
92 } | 92 } |
93 | 93 |
94 private: | 94 private: |
95 friend class CallDescriptor; | 95 friend class CallDescriptor; |
96 friend class OperandGenerator; | 96 friend class OperandGenerator; |
97 | 97 |
98 enum LocationType { REGISTER, STACK_SLOT }; | 98 enum LocationType { REGISTER, STACK_SLOT }; |
99 | 99 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 CallDescriptor* const incoming_; | 403 CallDescriptor* const incoming_; |
404 | 404 |
405 DISALLOW_COPY_AND_ASSIGN(Linkage); | 405 DISALLOW_COPY_AND_ASSIGN(Linkage); |
406 }; | 406 }; |
407 | 407 |
408 } // namespace compiler | 408 } // namespace compiler |
409 } // namespace internal | 409 } // namespace internal |
410 } // namespace v8 | 410 } // namespace v8 |
411 | 411 |
412 #endif // V8_COMPILER_LINKAGE_H_ | 412 #endif // V8_COMPILER_LINKAGE_H_ |
OLD | NEW |