| 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/machine-type.h" | 10 #include "src/compiler/machine-type.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 LinkageLocation GetReturnLocation() const { | 306 LinkageLocation GetReturnLocation() const { |
| 307 return incoming_->GetReturnLocation(0); | 307 return incoming_->GetReturnLocation(0); |
| 308 } | 308 } |
| 309 | 309 |
| 310 // Get the machine type of this function's return value. | 310 // Get the machine type of this function's return value. |
| 311 MachineType GetReturnType() const { return incoming_->GetReturnType(0); } | 311 MachineType GetReturnType() const { return incoming_->GetReturnType(0); } |
| 312 | 312 |
| 313 // Get the frame offset for a given spill slot. The location depends on the | 313 // Get the frame offset for a given spill slot. The location depends on the |
| 314 // calling convention and the specific frame layout, and may thus be | 314 // calling convention and the specific frame layout, and may thus be |
| 315 // architecture-specific. Negative spill slots indicate arguments on the | 315 // architecture-specific. Negative spill slots indicate arguments on the |
| 316 // caller's frame. | 316 // caller's frame. The {extra} parameter indicates an additional offset from |
| 317 FrameOffset GetFrameOffset(int spill_slot, Frame* frame) const; | 317 // the frame offset, e.g. to index into part of a double slot. |
| 318 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0) const; |
| 318 | 319 |
| 319 static int FrameStateInputCount(Runtime::FunctionId function); | 320 static int FrameStateInputCount(Runtime::FunctionId function); |
| 320 | 321 |
| 321 // Get the location where an incoming OSR value is stored. | 322 // Get the location where an incoming OSR value is stored. |
| 322 LinkageLocation GetOsrValueLocation(int index) const; | 323 LinkageLocation GetOsrValueLocation(int index) const; |
| 323 | 324 |
| 324 // A special parameter index for JSCalls that represents the closure. | 325 // A special parameter index for JSCalls that represents the closure. |
| 325 static const int kJSFunctionCallClosureParamIndex = -1; | 326 static const int kJSFunctionCallClosureParamIndex = -1; |
| 326 | 327 |
| 327 // A special {OsrValue} index to indicate the context spill slot. | 328 // A special {OsrValue} index to indicate the context spill slot. |
| 328 static const int kOsrContextSpillSlotIndex = -1; | 329 static const int kOsrContextSpillSlotIndex = -1; |
| 329 | 330 |
| 330 // Special parameter indices used to pass fixed register data through | 331 // Special parameter indices used to pass fixed register data through |
| 331 // interpreter dispatches. | 332 // interpreter dispatches. |
| 332 static const int kInterpreterBytecodeOffsetParameter = 0; | 333 static const int kInterpreterBytecodeOffsetParameter = 0; |
| 333 static const int kInterpreterBytecodeArrayParameter = 1; | 334 static const int kInterpreterBytecodeArrayParameter = 1; |
| 334 static const int kInterpreterDispatchTableParameter = 2; | 335 static const int kInterpreterDispatchTableParameter = 2; |
| 335 | 336 |
| 336 private: | 337 private: |
| 337 CallDescriptor* const incoming_; | 338 CallDescriptor* const incoming_; |
| 338 | 339 |
| 339 DISALLOW_COPY_AND_ASSIGN(Linkage); | 340 DISALLOW_COPY_AND_ASSIGN(Linkage); |
| 340 }; | 341 }; |
| 341 | 342 |
| 342 } // namespace compiler | 343 } // namespace compiler |
| 343 } // namespace internal | 344 } // namespace internal |
| 344 } // namespace v8 | 345 } // namespace v8 |
| 345 | 346 |
| 346 #endif // V8_COMPILER_LINKAGE_H_ | 347 #endif // V8_COMPILER_LINKAGE_H_ |
| OLD | NEW |