void CodeGenerator::AddNopForSmiCodeInlining() {
// On 32-bit ARM we do not insert nops for inlined Smi code.
- UNREACHABLE();
}
#undef __
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
UNREACHABLE();
return;
}
- opcode |= MiscField::encode(descriptor->deoptimization_support());
+ opcode |= MiscField::encode(descriptor->flags());
// Emit the call instruction.
Instruction* call_instr =
}
-CallDescriptor* Linkage::GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+CallDescriptor* Linkage::GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags,
+ Zone* zone) {
return LinkageHelper::GetRuntimeCallDescriptor<LinkageHelperTraits>(
- zone, function, parameter_count, properties, can_deoptimize);
+ zone, function, parameter_count, properties, flags);
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+ CallDescriptor::Flags flags, Zone* zone) {
return LinkageHelper::GetStubCallDescriptor<LinkageHelperTraits>(
- zone, descriptor, stack_parameter_count, can_deoptimize);
+ zone, descriptor, stack_parameter_count, flags);
}
__ Call(target);
}
AddSafepointAndDeopt(instr);
- // Meaningless instruction for ICs to overwrite.
- AddNopForSmiCodeInlining();
break;
}
case kArchCallJSFunction: {
UNREACHABLE();
return;
}
- opcode |= MiscField::encode(descriptor->deoptimization_support());
+ opcode |= MiscField::encode(descriptor->flags());
// Emit the call instruction.
Instruction* call_instr =
}
-CallDescriptor* Linkage::GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+CallDescriptor* Linkage::GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags,
+ Zone* zone) {
return LinkageHelper::GetRuntimeCallDescriptor<LinkageHelperTraits>(
- zone, function, parameter_count, properties, can_deoptimize);
+ zone, function, parameter_count, properties, flags);
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+ CallDescriptor::Flags flags, Zone* zone) {
return LinkageHelper::GetStubCallDescriptor<LinkageHelperTraits>(
- zone, descriptor, stack_parameter_count, can_deoptimize);
+ zone, descriptor, stack_parameter_count, flags);
}
void CodeGenerator::AddSafepointAndDeopt(Instruction* instr) {
- CallDescriptor::DeoptimizationSupport deopt =
- static_cast<CallDescriptor::DeoptimizationSupport>(
- MiscField::decode(instr->opcode()));
+ CallDescriptor::Flags flags(MiscField::decode(instr->opcode()));
- bool needs_frame_state = (deopt & CallDescriptor::kNeedsFrameState) != 0;
+ bool needs_frame_state = (flags & CallDescriptor::kNeedsFrameState);
Safepoint::Id safepoint_id = RecordSafepoint(
instr->pointer_map(), Safepoint::kSimple, 0,
needs_frame_state ? Safepoint::kLazyDeopt : Safepoint::kNoLazyDeopt);
- if ((deopt & CallDescriptor::kLazyDeoptimization) != 0) {
+ if (flags & CallDescriptor::kLazyDeoptimization) {
RecordLazyDeoptimizationEntry(instr, safepoint_id);
}
#endif
safepoints()->RecordLazyDeoptimizationIndex(deoptimization_id);
}
+
+ if (flags & CallDescriptor::kNeedsNopAfterCall) {
+ AddNopForSmiCodeInlining();
+ }
}
__ call(Operand(reg, Code::kHeaderSize - kHeapObjectTag));
}
AddSafepointAndDeopt(instr);
- AddNopForSmiCodeInlining();
break;
}
case kArchCallJSFunction: {
#undef __
-}
-}
-} // namespace v8::internal::compiler
+} // namespace compiler
+} // namespace internal
+} // namespace v8
UNREACHABLE();
return;
}
- opcode |= MiscField::encode(descriptor->deoptimization_support());
+ opcode |= MiscField::encode(descriptor->flags());
// Emit the call instruction.
Instruction* call_instr =
}
-CallDescriptor* Linkage::GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+CallDescriptor* Linkage::GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags,
+ Zone* zone) {
return LinkageHelper::GetRuntimeCallDescriptor<LinkageHelperTraits>(
- zone, function, parameter_count, properties, can_deoptimize);
+ zone, function, parameter_count, properties, flags);
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+ CallDescriptor::Flags flags, Zone* zone) {
return LinkageHelper::GetStubCallDescriptor<LinkageHelperTraits>(
- zone, descriptor, stack_parameter_count, can_deoptimize);
+ zone, descriptor, stack_parameter_count, flags);
}
return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>(
zone, num_params, return_type, param_types);
}
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
// TODO(mstarzinger): This is a temporary workaround for non-hydrogen stubs for
-// which we don't have an interface descriptor yet. Use ReplaceWithICStubCall
+// which we don't have an interface descriptor yet. Use ReplaceWithStubCall
// once these stub have been made into a HydrogenCodeStub.
template <typename T>
static CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate,
}
-#define REPLACE_IC_STUB_CALL(op, StubDeclaration) \
- Node* JSGenericLowering::Lower##op(Node* node) { \
- StubDeclaration; \
- ReplaceWithICStubCall(node, &stub); \
- return node; \
+#define REPLACE_BINARY_OP_IC_CALL(op, token) \
+ Node* JSGenericLowering::Lower##op(Node* node) { \
+ BinaryOpICStub stub(isolate(), token); \
+ ReplaceWithStubCall(node, &stub, \
+ CallDescriptor::kPatchableCallSiteWithNop); \
+ return node; \
+ }
+REPLACE_BINARY_OP_IC_CALL(JSBitwiseOr, Token::BIT_OR)
+REPLACE_BINARY_OP_IC_CALL(JSBitwiseXor, Token::BIT_XOR)
+REPLACE_BINARY_OP_IC_CALL(JSBitwiseAnd, Token::BIT_AND)
+REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL)
+REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR)
+REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR)
+REPLACE_BINARY_OP_IC_CALL(JSAdd, Token::ADD)
+REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB)
+REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL)
+REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV)
+REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD)
+#undef REPLACE_BINARY_OP_IC_CALL
+
+
+#define REPLACE_STUB_CALL(op, StubDeclaration) \
+ Node* JSGenericLowering::Lower##op(Node* node) { \
+ StubDeclaration; \
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kNoFlags); \
+ return node; \
}
-REPLACE_IC_STUB_CALL(JSBitwiseOr, BinaryOpICStub stub(isolate(), Token::BIT_OR))
-REPLACE_IC_STUB_CALL(JSBitwiseXor,
- BinaryOpICStub stub(isolate(), Token::BIT_XOR))
-REPLACE_IC_STUB_CALL(JSBitwiseAnd,
- BinaryOpICStub stub(isolate(), Token::BIT_AND))
-REPLACE_IC_STUB_CALL(JSShiftLeft, BinaryOpICStub stub(isolate(), Token::SHL))
-REPLACE_IC_STUB_CALL(JSShiftRight, BinaryOpICStub stub(isolate(), Token::SAR))
-REPLACE_IC_STUB_CALL(JSShiftRightLogical,
- BinaryOpICStub stub(isolate(), Token::SHR))
-REPLACE_IC_STUB_CALL(JSAdd, BinaryOpICStub stub(isolate(), Token::ADD))
-REPLACE_IC_STUB_CALL(JSSubtract, BinaryOpICStub stub(isolate(), Token::SUB))
-REPLACE_IC_STUB_CALL(JSMultiply, BinaryOpICStub stub(isolate(), Token::MUL))
-REPLACE_IC_STUB_CALL(JSDivide, BinaryOpICStub stub(isolate(), Token::DIV))
-REPLACE_IC_STUB_CALL(JSModulus, BinaryOpICStub stub(isolate(), Token::MOD))
-REPLACE_IC_STUB_CALL(JSToNumber, ToNumberStub stub(isolate()))
-#undef REPLACE_IC_STUB_CALL
+REPLACE_STUB_CALL(JSToNumber, ToNumberStub stub(isolate()))
+#undef REPLACE_STUB_CALL
#define REPLACE_COMPARE_IC_CALL(op, token, pure) \
#undef REPLACE_UNIMPLEMENTED
-static CallDescriptor::DeoptimizationSupport DeoptimizationSupportForNode(
- Node* node) {
- int result = CallDescriptor::kNoDeoptimization;
+static CallDescriptor::Flags FlagsForNode(Node* node) {
+ CallDescriptor::Flags result = CallDescriptor::kNoFlags;
if (OperatorProperties::CanLazilyDeoptimize(node->op())) {
result |= CallDescriptor::kLazyDeoptimization;
}
if (OperatorProperties::HasFrameStateInput(node->op())) {
result |= CallDescriptor::kNeedsFrameState;
}
- return static_cast<CallDescriptor::DeoptimizationSupport>(result);
+ return result;
}
bool pure) {
BinaryOpICStub stub(isolate(), Token::ADD); // TODO(mstarzinger): Hack.
CodeStubInterfaceDescriptor* d = stub.GetInterfaceDescriptor();
- CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor(d);
+ CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor(
+ d, 0, CallDescriptor::kPatchableCallSiteWithNop);
Handle<Code> ic = CompareIC::GetUninitialized(isolate(), token);
Node* compare;
if (pure) {
}
-void JSGenericLowering::ReplaceWithICStubCall(Node* node,
- HydrogenCodeStub* stub) {
+void JSGenericLowering::ReplaceWithStubCall(Node* node, HydrogenCodeStub* stub,
+ CallDescriptor::Flags flags) {
CodeStubInterfaceDescriptor* d = stub->GetInterfaceDescriptor();
- CallDescriptor* desc = linkage()->GetStubCallDescriptor(
- d, 0, DeoptimizationSupportForNode(node));
+ CallDescriptor* desc =
+ linkage()->GetStubCallDescriptor(d, 0, flags | FlagsForNode(node));
Node* stub_code = CodeConstant(stub->GetCode());
PatchInsertInput(node, 0, stub_code);
PatchOperator(node, common()->Call(desc));
Operator::Property props = node->op()->properties();
const Runtime::Function* fun = Runtime::FunctionForId(f);
int nargs = (nargs_override < 0) ? fun->nargs : nargs_override;
- CallDescriptor* desc = linkage()->GetRuntimeCallDescriptor(
- f, nargs, props, DeoptimizationSupportForNode(node));
+ CallDescriptor* desc =
+ linkage()->GetRuntimeCallDescriptor(f, nargs, props, FlagsForNode(node));
Node* ref = ExternalConstant(ExternalReference(f, isolate()));
Node* arity = Int32Constant(nargs);
if (!centrystub_constant_.is_set()) {
Node* JSGenericLowering::LowerJSUnaryNot(Node* node) {
ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL);
- ReplaceWithICStubCall(node, &stub);
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
return node;
}
Node* JSGenericLowering::LowerJSToBoolean(Node* node) {
ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_ODDBALL);
- ReplaceWithICStubCall(node, &stub);
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
return node;
}
Node* JSGenericLowering::LowerJSLoadProperty(Node* node) {
KeyedLoadICStubShim stub(isolate());
- ReplaceWithICStubCall(node, &stub);
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
return node;
}
LoadNamedParameters p = OpParameter<LoadNamedParameters>(node);
LoadICStubShim stub(isolate(), p.contextual_mode);
PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name));
- ReplaceWithICStubCall(node, &stub);
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
return node;
}
Node* JSGenericLowering::LowerJSStoreProperty(Node* node) {
StrictMode strict_mode = OpParameter<StrictMode>(node);
KeyedStoreICStubShim stub(isolate(), strict_mode);
- ReplaceWithICStubCall(node, &stub);
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
return node;
}
StoreNamedParameters params = OpParameter<StoreNamedParameters>(node);
StoreICStubShim stub(isolate(), params.strict_mode);
PatchInsertInput(node, 1, jsgraph()->HeapConstant(params.name));
- ReplaceWithICStubCall(node, &stub);
+ ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
return node;
}
int arity = OpParameter<int>(node);
CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS);
CodeStubInterfaceDescriptor* d = GetInterfaceDescriptor(isolate(), &stub);
- CallDescriptor* desc = linkage()->GetStubCallDescriptor(
- d, arity, DeoptimizationSupportForNode(node));
+ CallDescriptor* desc =
+ linkage()->GetStubCallDescriptor(d, arity, FlagsForNode(node));
Node* stub_code = CodeConstant(stub.GetCode());
Node* construct = NodeProperties::GetValueInput(node, 0);
PatchInsertInput(node, 0, stub_code);
CallParameters p = OpParameter<CallParameters>(node);
CallFunctionStub stub(isolate(), p.arity - 2, p.flags);
CodeStubInterfaceDescriptor* d = GetInterfaceDescriptor(isolate(), &stub);
- CallDescriptor* desc = linkage()->GetStubCallDescriptor(
- d, p.arity - 1, DeoptimizationSupportForNode(node));
+ CallDescriptor* desc =
+ linkage()->GetStubCallDescriptor(d, p.arity - 1, FlagsForNode(node));
Node* stub_code = CodeConstant(stub.GetCode());
PatchInsertInput(node, 0, stub_code);
PatchOperator(node, common()->Call(desc));
ReplaceWithRuntimeCall(node, function, arity);
return node;
}
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
// Helpers to replace existing nodes with a generic call.
void ReplaceWithCompareIC(Node* node, Token::Value token, bool pure);
- void ReplaceWithICStubCall(Node* node, HydrogenCodeStub* stub);
+ void ReplaceWithStubCall(Node* node, HydrogenCodeStub* stub,
+ CallDescriptor::Flags flags);
void ReplaceWithBuiltinCall(Node* node, Builtins::JavaScript id, int args);
void ReplaceWithRuntimeCall(Node* node, Runtime::FunctionId f, int args = -1);
MachineOperatorBuilder* machine_;
SetOncePointer<Node> centrystub_constant_;
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_JS_GENERIC_LOWERING_H_
locations, // locations
Operator::kNoProperties, // properties
kNoCalleeSaved, // callee-saved registers
- CallDescriptor::kLazyDeoptimization); // deoptimization
+ CallDescriptor::kLazyDeoptimization); // flags
}
template <typename LinkageTraits>
static CallDescriptor* GetRuntimeCallDescriptor(
Zone* zone, Runtime::FunctionId function_id, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize) {
+ Operator::Property properties, CallDescriptor::Flags flags) {
const int code_count = 1;
const int function_count = 1;
const int num_args_count = 1;
locations, // locations
properties, // properties
kNoCalleeSaved, // callee-saved registers
- can_deoptimize, // deoptimization
+ flags, // flags
function->name);
}
template <typename LinkageTraits>
static CallDescriptor* GetStubCallDescriptor(
Zone* zone, CodeStubInterfaceDescriptor* descriptor,
- int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize) {
+ int stack_parameter_count, CallDescriptor::Flags flags) {
int register_parameter_count = descriptor->GetEnvironmentParameterCount();
int parameter_count = register_parameter_count + stack_parameter_count;
const int code_count = 1;
locations, // locations
Operator::kNoProperties, // properties
kNoCalleeSaved, // callee-saved registers
- can_deoptimize, // deoptimization
+ flags, // flags
CodeStub::MajorName(descriptor->MajorKey(), false));
}
return new (zone) CallDescriptor(
CallDescriptor::kCallAddress, 1, num_params, num_params + 1, locations,
Operator::kNoProperties, LinkageTraits::CCalleeSaveRegisters(),
- CallDescriptor::kNoDeoptimization); // TODO(jarin) should deoptimize!
+ CallDescriptor::kNoFlags); // TODO(jarin) should deoptimize!
}
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_LINKAGE_IMPL_H_
}
-CallDescriptor* Linkage::GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize) {
- return GetRuntimeCallDescriptor(function, parameter_count, properties,
- can_deoptimize, this->info_->zone());
+CallDescriptor* Linkage::GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags) {
+ return GetRuntimeCallDescriptor(function, parameter_count, properties, flags,
+ this->info_->zone());
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize) {
- return GetStubCallDescriptor(descriptor, stack_parameter_count,
- can_deoptimize, this->info_->zone());
+ CallDescriptor::Flags flags) {
+ return GetStubCallDescriptor(descriptor, stack_parameter_count, flags,
+ this->info_->zone());
}
}
-CallDescriptor* Linkage::GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+CallDescriptor* Linkage::GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags,
+ Zone* zone) {
UNIMPLEMENTED();
return NULL;
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+ CallDescriptor::Flags flags, Zone* zone) {
UNIMPLEMENTED();
return NULL;
}
#ifndef V8_COMPILER_LINKAGE_H_
#define V8_COMPILER_LINKAGE_H_
-#include "src/v8.h"
-
+#include "src/base/flags.h"
#include "src/code-stubs.h"
#include "src/compiler/frame.h"
#include "src/compiler/machine-type.h"
};
-class CallDescriptor : public ZoneObject {
+class CallDescriptor V8_FINAL : public ZoneObject {
public:
// Describes whether the first parameter is a code object, a JSFunction,
// or an address--all of which require different machine sequences to call.
enum Kind { kCallCodeObject, kCallJSFunction, kCallAddress };
- // TODO(jarin) kLazyDeoptimization and kNeedsFrameState should be unified.
- enum DeoptimizationSupport {
- kNoDeoptimization = 0,
- kLazyDeoptimization = 1,
- kNeedsFrameState = 2
+ enum Flag {
+ // TODO(jarin) kLazyDeoptimization and kNeedsFrameState should be unified.
+ kNoFlags = 0u,
+ kLazyDeoptimization = 1u << 0,
+ kNeedsFrameState = 1u << 1,
+ kPatchableCallSite = 1u << 2,
+ kNeedsNopAfterCall = 1u << 3,
+ kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall
};
+ DEFINE_FLAGS(Flags, Flag);
CallDescriptor(Kind kind, int8_t return_count, int16_t parameter_count,
int16_t input_count, LinkageLocation* locations,
Operator::Property properties, RegList callee_saved_registers,
- DeoptimizationSupport deoptimization_support,
- const char* debug_name = "")
+ Flags flags, const char* debug_name = "")
: kind_(kind),
return_count_(return_count),
parameter_count_(parameter_count),
locations_(locations),
properties_(properties),
callee_saved_registers_(callee_saved_registers),
- deoptimization_support_(deoptimization_support),
+ flags_(flags),
debug_name_(debug_name) {}
// Returns the kind of this call.
Kind kind() const { return kind_; }
int FrameStateCount() const { return NeedsFrameState() ? 1 : 0; }
- bool CanLazilyDeoptimize() const {
- return (deoptimization_support() & kLazyDeoptimization) != 0;
- }
+ Flags flags() const { return flags_; }
- bool NeedsFrameState() const {
- return (deoptimization_support() & kNeedsFrameState) != 0;
- }
-
- DeoptimizationSupport deoptimization_support() const {
- return deoptimization_support_;
- }
+ bool CanLazilyDeoptimize() const { return flags() & kLazyDeoptimization; }
+ bool NeedsFrameState() const { return flags() & kNeedsFrameState; }
LinkageLocation GetReturnLocation(int index) {
DCHECK(index < return_count_);
LinkageLocation* locations_;
Operator::Property properties_;
RegList callee_saved_registers_;
- DeoptimizationSupport deoptimization_support_;
+ Flags flags_;
const char* debug_name_;
};
+DEFINE_OPERATORS_FOR_FLAGS(CallDescriptor::Flags)
+
OStream& operator<<(OStream& os, const CallDescriptor& d);
OStream& operator<<(OStream& os, const CallDescriptor::Kind& k);
CallDescriptor* GetRuntimeCallDescriptor(
Runtime::FunctionId function, int parameter_count,
Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize =
- CallDescriptor::kNoDeoptimization);
- static CallDescriptor* GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone);
+ CallDescriptor::Flags flags = CallDescriptor::kNoFlags);
+ static CallDescriptor* GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags,
+ Zone* zone);
CallDescriptor* GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count = 0,
- CallDescriptor::DeoptimizationSupport can_deoptimize =
- CallDescriptor::kNoDeoptimization);
+ CallDescriptor::Flags flags = CallDescriptor::kNoFlags);
static CallDescriptor* GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone);
+ CallDescriptor::Flags flags, Zone* zone);
// Creates a call descriptor for simplified C calls that is appropriate
// for the host platform. This simplified calling convention only supports
CompilationInfo* info_;
CallDescriptor* incoming_;
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_LINKAGE_H_
stub.InitializeInterfaceDescriptor(d);
CallDescriptor* desc = Linkage::GetStubCallDescriptor(
- d, 1, static_cast<CallDescriptor::DeoptimizationSupport>(
- CallDescriptor::kLazyDeoptimization |
- CallDescriptor::kNeedsFrameState),
+ d, 1,
+ CallDescriptor::kLazyDeoptimization | CallDescriptor::kNeedsFrameState,
zone());
Node* stub_code = HeapConstant(stub.GetCode());
Node* call = graph()->NewNode(common()->Call(desc), stub_code, function,
__ Call(Operand(reg, entry));
}
AddSafepointAndDeopt(instr);
- AddNopForSmiCodeInlining();
break;
}
case kArchCallAddress:
UNREACHABLE();
return;
}
- opcode |= MiscField::encode(descriptor->deoptimization_support());
+ opcode |= MiscField::encode(descriptor->flags());
// Emit the call instruction.
Instruction* call_instr =
}
-CallDescriptor* Linkage::GetRuntimeCallDescriptor(
- Runtime::FunctionId function, int parameter_count,
- Operator::Property properties,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+CallDescriptor* Linkage::GetRuntimeCallDescriptor(Runtime::FunctionId function,
+ int parameter_count,
+ Operator::Property properties,
+ CallDescriptor::Flags flags,
+ Zone* zone) {
return LinkageHelper::GetRuntimeCallDescriptor<LinkageHelperTraits>(
- zone, function, parameter_count, properties, can_deoptimize);
+ zone, function, parameter_count, properties, flags);
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CodeStubInterfaceDescriptor* descriptor, int stack_parameter_count,
- CallDescriptor::DeoptimizationSupport can_deoptimize, Zone* zone) {
+ CallDescriptor::Flags flags, Zone* zone) {
return LinkageHelper::GetStubCallDescriptor<LinkageHelperTraits>(
- zone, descriptor, stack_parameter_count, can_deoptimize);
+ zone, descriptor, stack_parameter_count, flags);
}