| 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/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compiler/frame.h" | 10 #include "src/compiler/frame.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 public: | 140 public: |
| 141 explicit Linkage(CompilationInfo* info); | 141 explicit Linkage(CompilationInfo* info); |
| 142 explicit Linkage(CompilationInfo* info, CallDescriptor* incoming) | 142 explicit Linkage(CompilationInfo* info, CallDescriptor* incoming) |
| 143 : info_(info), incoming_(incoming) {} | 143 : info_(info), incoming_(incoming) {} |
| 144 | 144 |
| 145 // The call descriptor for this compilation unit describes the locations | 145 // The call descriptor for this compilation unit describes the locations |
| 146 // of incoming parameters and the outgoing return value(s). | 146 // of incoming parameters and the outgoing return value(s). |
| 147 CallDescriptor* GetIncomingDescriptor() { return incoming_; } | 147 CallDescriptor* GetIncomingDescriptor() { return incoming_; } |
| 148 CallDescriptor* GetJSCallDescriptor(int parameter_count); | 148 CallDescriptor* GetJSCallDescriptor(int parameter_count); |
| 149 static CallDescriptor* GetJSCallDescriptor(int parameter_count, Zone* zone); | 149 static CallDescriptor* GetJSCallDescriptor(int parameter_count, Zone* zone); |
| 150 CallDescriptor* GetRuntimeCallDescriptor( | 150 CallDescriptor* GetRuntimeCallDescriptor(Runtime::FunctionId function, |
| 151 Runtime::FunctionId function, int parameter_count, | 151 int parameter_count, |
| 152 Operator::Property properties, | 152 Operator::Property properties); |
| 153 CallDescriptor::Flags flags = CallDescriptor::kNoFlags); | |
| 154 static CallDescriptor* GetRuntimeCallDescriptor(Runtime::FunctionId function, | 153 static CallDescriptor* GetRuntimeCallDescriptor(Runtime::FunctionId function, |
| 155 int parameter_count, | 154 int parameter_count, |
| 156 Operator::Property properties, | 155 Operator::Property properties, |
| 157 CallDescriptor::Flags flags, | |
| 158 Zone* zone); | 156 Zone* zone); |
| 159 | 157 |
| 160 CallDescriptor* GetStubCallDescriptor( | 158 CallDescriptor* GetStubCallDescriptor( |
| 161 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count = 0, | 159 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count = 0, |
| 162 CallDescriptor::Flags flags = CallDescriptor::kNoFlags); | 160 CallDescriptor::Flags flags = CallDescriptor::kNoFlags); |
| 163 static CallDescriptor* GetStubCallDescriptor( | 161 static CallDescriptor* GetStubCallDescriptor( |
| 164 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count, | 162 CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count, |
| 165 CallDescriptor::Flags flags, Zone* zone); | 163 CallDescriptor::Flags flags, Zone* zone); |
| 166 | 164 |
| 167 // Creates a call descriptor for simplified C calls that is appropriate | 165 // Creates a call descriptor for simplified C calls that is appropriate |
| (...skipping 16 matching lines...) Expand all Loading... |
| 184 | 182 |
| 185 // Get the frame offset for a given spill slot. The location depends on the | 183 // Get the frame offset for a given spill slot. The location depends on the |
| 186 // calling convention and the specific frame layout, and may thus be | 184 // calling convention and the specific frame layout, and may thus be |
| 187 // architecture-specific. Negative spill slots indicate arguments on the | 185 // architecture-specific. Negative spill slots indicate arguments on the |
| 188 // caller's frame. The {extra} parameter indicates an additional offset from | 186 // caller's frame. The {extra} parameter indicates an additional offset from |
| 189 // the frame offset, e.g. to index into part of a double slot. | 187 // the frame offset, e.g. to index into part of a double slot. |
| 190 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0); | 188 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0); |
| 191 | 189 |
| 192 CompilationInfo* info() const { return info_; } | 190 CompilationInfo* info() const { return info_; } |
| 193 | 191 |
| 192 static bool NeedsFrameState(Runtime::FunctionId function); |
| 193 |
| 194 private: | 194 private: |
| 195 CompilationInfo* info_; | 195 CompilationInfo* info_; |
| 196 CallDescriptor* incoming_; | 196 CallDescriptor* incoming_; |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace compiler | 199 } // namespace compiler |
| 200 } // namespace internal | 200 } // namespace internal |
| 201 } // namespace v8 | 201 } // namespace v8 |
| 202 | 202 |
| 203 #endif // V8_COMPILER_LINKAGE_H_ | 203 #endif // V8_COMPILER_LINKAGE_H_ |
| OLD | NEW |