5 #ifndef V8_COMPILER_LINKAGE_H_
6 #define V8_COMPILER_LINKAGE_H_
51 kNeedsFrameState = 1u << 0,
52 kPatchableCallSite = 1u << 1,
53 kNeedsNopAfterCall = 1u << 2,
54 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall
56 typedef base::Flags<Flag>
Flags;
62 const char* debug_name =
"")
64 target_type_(target_type),
65 target_loc_(target_loc),
66 machine_sig_(machine_sig),
67 location_sig_(location_sig),
68 js_param_count_(js_param_count),
69 properties_(properties),
70 callee_saved_registers_(callee_saved_registers),
72 debug_name_(debug_name) {
84 size_t ReturnCount()
const {
return machine_sig_->return_count(); }
93 size_t InputCount()
const {
return 1 + machine_sig_->parameter_count(); }
102 return location_sig_->GetReturn(index);
106 if (index == 0)
return target_loc_;
107 return location_sig_->GetParam(index - 1);
113 return machine_sig_->GetReturn(index);
117 if (index == 0)
return target_type_;
118 return machine_sig_->GetParam(index - 1);
182 CallDescriptor::Flags
flags = CallDescriptor::kNoFlags);
185 CallDescriptor::Flags
flags,
Zone* zone);
196 return incoming_->GetInputLocation(index + 1);
201 return incoming_->GetInputType(index + 1);
#define DEFINE_OPERATORS_FOR_FLAGS(Type)
const char * debug_name() const
size_t JSParameterCount() const
const MachineSignature * GetMachineSignature() const
CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, MachineSignature *machine_sig, LocationSignature *location_sig, size_t js_param_count, Operator::Properties properties, RegList callee_saved_registers, Flags flags, const char *debug_name="")
size_t ReturnCount() const
Operator::Properties properties_
RegList CalleeSavedRegisters() const
base::Flags< Flag > Flags
LocationSignature * location_sig_
RegList callee_saved_registers_
LinkageLocation GetReturnLocation(size_t index) const
LinkageLocation target_loc_
MachineType GetReturnType(size_t index) const
size_t InputCount() const
Operator::Properties properties() const
bool NeedsFrameState() const
size_t FrameStateCount() const
MachineType GetInputType(size_t index) const
LinkageLocation GetInputLocation(size_t index) const
MachineSignature * machine_sig_
bool IsJSFunctionCall() const
LinkageLocation(int location)
static LinkageLocation AnyRegister()
friend class CallDescriptor
static const int16_t ANY_REGISTER
FrameOffset GetFrameOffset(int spill_slot, Frame *frame, int extra=0)
static bool NeedsFrameState(Runtime::FunctionId function)
Linkage(CompilationInfo *info)
CompilationInfo * info() const
LinkageLocation GetParameterLocation(int index)
CallDescriptor * GetStubCallDescriptor(CallInterfaceDescriptor descriptor, int stack_parameter_count=0, CallDescriptor::Flags flags=CallDescriptor::kNoFlags)
CallDescriptor * GetIncomingDescriptor()
CallDescriptor * GetJSCallDescriptor(int parameter_count)
Linkage(CompilationInfo *info, CallDescriptor *incoming)
CallDescriptor * incoming_
MachineType GetReturnType()
CallDescriptor * GetRuntimeCallDescriptor(Runtime::FunctionId function, int parameter_count, Operator::Properties properties)
MachineType GetParameterType(int index)
LinkageLocation GetReturnLocation()
static CallDescriptor * GetSimplifiedCDescriptor(Zone *zone, MachineSignature *sig)
base::Flags< Property, uint8_t > Properties
size_t return_count() const
size_t parameter_count() const
#define DCHECK(condition)
std::ostream & operator<<(std::ostream &os, const MachineType &type)
Signature< LinkageLocation > LocationSignature
Debugger support for the V8 JavaScript engine.