V(FunctionPrototype) \
V(Instanceof) \
V(InternalArrayConstructor) \
+ V(JSConstructEntry) \
V(JSEntry) \
V(KeyedLoadICTrampoline) \
V(LoadICTrampoline) \
Isolate* isolate() const { return isolate_; }
protected:
- explicit CodeStub(uint32_t key) : minor_key_(MinorKeyFromKey(key)) {}
+ CodeStub(uint32_t key, Isolate* isolate)
+ : minor_key_(MinorKeyFromKey(key)), isolate_(isolate) {}
// Generates the assembler code for the stub.
virtual Handle<Code> GenerateCode() = 0;
};
+#define DEFINE_CODE_STUB_BASE(NAME, SUPER) \
+ public: \
+ NAME(uint32_t key, Isolate* isolate) : SUPER(key, isolate) {} \
+ \
+ private: \
+ DISALLOW_COPY_AND_ASSIGN(NAME)
+
+
+#define DEFINE_CODE_STUB(NAME, SUPER) \
+ protected: \
+ virtual inline Major MajorKey() const OVERRIDE { \
+ return NAME; \
+ }; \
+ DEFINE_CODE_STUB_BASE(NAME##Stub, SUPER)
+
+
class PlatformCodeStub : public CodeStub {
public:
- explicit PlatformCodeStub(Isolate* isolate) : CodeStub(isolate) { }
-
// Retrieve the code for the stub. Generate the code if needed.
virtual Handle<Code> GenerateCode() OVERRIDE;
virtual Code::Kind GetCodeKind() const { return Code::STUB; }
protected:
+ explicit PlatformCodeStub(Isolate* isolate) : CodeStub(isolate) {}
+
// Generates the assembler code for the stub.
virtual void Generate(MacroAssembler* masm) = 0;
- explicit PlatformCodeStub(uint32_t key) : CodeStub(key) {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PlatformCodeStub);
+ DEFINE_CODE_STUB_BASE(PlatformCodeStub, CodeStub);
};
INITIALIZED
};
- explicit HydrogenCodeStub(Isolate* isolate,
- InitializationState state = INITIALIZED)
- : CodeStub(isolate) {
- minor_key_ = IsMissBits::encode(state == UNINITIALIZED);
- }
-
virtual Code::Kind GetCodeKind() const { return Code::STUB; }
CodeStubInterfaceDescriptor* GetInterfaceDescriptor() {
void TraceTransition(StateType from, StateType to);
protected:
+ explicit HydrogenCodeStub(Isolate* isolate,
+ InitializationState state = INITIALIZED)
+ : CodeStub(isolate) {
+ minor_key_ = IsMissBits::encode(state == UNINITIALIZED);
+ }
+
void set_sub_minor_key(uint32_t key) {
minor_key_ = SubMinorKeyBits::update(minor_key_, key);
}
void GenerateLightweightMiss(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(HydrogenCodeStub);
+ DEFINE_CODE_STUB_BASE(HydrogenCodeStub, CodeStub);
};
isolate->code_stub_interface_descriptor(CodeStub::ToNumber));
}
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(ToNumberStub);
+ DEFINE_CODE_STUB(ToNumber, HydrogenCodeStub);
};
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kNumber = 0;
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(NumberToStringStub);
+ DEFINE_CODE_STUB(NumberToString, HydrogenCodeStub);
};
bool is_generator() const { return IsGeneratorBits::decode(sub_minor_key()); }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class StrictModeBits : public BitField<StrictMode, 0, 1> {};
class IsGeneratorBits : public BitField<bool, 1, 1> {};
- DISALLOW_COPY_AND_ASSIGN(FastNewClosureStub);
+ DEFINE_CODE_STUB(FastNewClosure, HydrogenCodeStub);
};
static const int kFunction = 0;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class SlotsBits : public BitField<int, 0, 8> {};
- DISALLOW_COPY_AND_ASSIGN(FastNewContextStub);
+ DEFINE_CODE_STUB(FastNewContext, HydrogenCodeStub);
};
static void InstallDescriptors(Isolate* isolate);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {};
- DISALLOW_COPY_AND_ASSIGN(FastCloneShallowArrayStub);
+ DEFINE_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class LengthBits : public BitField<int, 0, 4> {};
- DISALLOW_COPY_AND_ASSIGN(FastCloneShallowObjectStub);
+ DEFINE_CODE_STUB(FastCloneShallowObject, HydrogenCodeStub);
};
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(CreateAllocationSiteStub);
+ DEFINE_CODE_STUB(CreateAllocationSite, HydrogenCodeStub);
};
CodeStubInterfaceDescriptor* descriptor);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
Flags flags() const { return FlagBits::decode(minor_key_); }
bool HasArgsInRegisters() const { return (flags() & kArgsInRegisters) != 0; }
class FlagBits : public BitField<Flags, 0, 3> {};
- DISALLOW_COPY_AND_ASSIGN(InstanceofStub);
+ DEFINE_CODE_STUB(Instanceof, PlatformCodeStub);
};
class ArrayConstructorStub: public PlatformCodeStub {
public:
enum ArgumentCountKey { ANY, NONE, ONE, MORE_THAN_ONE };
+
ArrayConstructorStub(Isolate* isolate, int argument_count);
explicit ArrayConstructorStub(Isolate* isolate);
void Generate(MacroAssembler* masm);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
ArgumentCountKey argument_count() const {
return ArgumentCountBits::decode(minor_key_);
}
class ArgumentCountBits : public BitField<ArgumentCountKey, 0, 2> {};
- DISALLOW_COPY_AND_ASSIGN(ArrayConstructorStub);
+ DEFINE_CODE_STUB(ArrayConstructor, PlatformCodeStub);
};
void Generate(MacroAssembler* masm);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void GenerateCase(MacroAssembler* masm, ElementsKind kind);
- DISALLOW_COPY_AND_ASSIGN(InternalArrayConstructorStub);
+ DEFINE_CODE_STUB(InternalArrayConstructor, PlatformCodeStub);
};
virtual void Generate(MacroAssembler* masm);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
ExponentType exponent_type() const {
return ExponentTypeBits::decode(minor_key_);
}
class ExponentTypeBits : public BitField<ExponentType, 0, 2> {};
- DISALLOW_COPY_AND_ASSIGN(MathPowStub);
+ DEFINE_CODE_STUB(MathPow, PlatformCodeStub);
};
void GenerateMiss(MacroAssembler* masm, IC::UtilityId id);
private:
- virtual inline Major MajorKey() const OVERRIDE;
-
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
- DISALLOW_COPY_AND_ASSIGN(CallICStub);
+ DEFINE_CODE_STUB(CallIC, PlatformCodeStub);
};
}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
- DISALLOW_COPY_AND_ASSIGN(CallIC_ArrayStub);
+ DEFINE_CODE_STUB(CallIC_Array, CallICStub);
};
public:
explicit FunctionPrototypeStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
+
virtual void Generate(MacroAssembler* masm);
- virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
+ virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
- DISALLOW_COPY_AND_ASSIGN(FunctionPrototypeStub);
+ DEFINE_CODE_STUB(FunctionPrototype, PlatformCodeStub);
};
protected:
explicit HandlerStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
+
virtual Code::Kind kind() const = 0;
- private:
- DISALLOW_COPY_AND_ASSIGN(HandlerStub);
+ DEFINE_CODE_STUB_BASE(HandlerStub, HydrogenCodeStub);
};
}
protected:
- explicit LoadFieldStub(Isolate* isolate);
virtual Code::Kind kind() const { return Code::LOAD_IC; }
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
- DISALLOW_COPY_AND_ASSIGN(LoadFieldStub);
+ DEFINE_CODE_STUB(LoadField, HandlerStub);
};
}
protected:
- explicit LoadConstantStub(Isolate* isolate);
virtual Code::Kind kind() const { return Code::LOAD_IC; }
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {};
- DISALLOW_COPY_AND_ASSIGN(LoadConstantStub);
+ DEFINE_CODE_STUB(LoadConstant, HandlerStub);
};
class StringLengthStub: public HandlerStub {
public:
explicit StringLengthStub(Isolate* isolate) : HandlerStub(isolate) {}
+
virtual Handle<Code> GenerateCode() OVERRIDE;
protected:
virtual Code::Kind kind() const { return Code::LOAD_IC; }
virtual Code::StubType GetStubType() { return Code::FAST; }
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(StringLengthStub);
+ DEFINE_CODE_STUB(StringLength, HandlerStub);
};
static void InstallDescriptors(Isolate* isolate);
protected:
- explicit StoreFieldStub(Isolate* isolate);
virtual Code::Kind kind() const { return Code::STORE_IC; }
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
class RepresentationBits : public BitField<uint8_t, 13, 4> {};
- DISALLOW_COPY_AND_ASSIGN(StoreFieldStub);
+ DEFINE_CODE_STUB(StoreField, HandlerStub);
};
}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class IsConstantBits: public BitField<bool, 0, 1> {};
class RepresentationBits: public BitField<Representation::Kind, 1, 8> {};
class CheckGlobalBits: public BitField<bool, 9, 1> {};
- DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub);
+ DEFINE_CODE_STUB(StoreGlobal, HandlerStub);
};
}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void Generate(MacroAssembler* masm) OVERRIDE;
bool is_store() const { return IsStoreBits::decode(minor_key_); }
class ArgumentBits: public BitField<int, 2, Code::kArgumentsBits> {};
STATIC_ASSERT(Code::kArgumentsBits + 2 <= kStubMinorKeyBits);
- DISALLOW_COPY_AND_ASSIGN(CallApiFunctionStub);
+ DEFINE_CODE_STUB(CallApiFunction, PlatformCodeStub);
};
private:
virtual void Generate(MacroAssembler* masm) OVERRIDE;
- virtual inline Major MajorKey() const FINAL OVERRIDE;
- DISALLOW_COPY_AND_ASSIGN(CallApiGetterStub);
+ DEFINE_CODE_STUB(CallApiGetter, PlatformCodeStub);
};
set_sub_minor_key(state.GetExtraICState());
}
- explicit BinaryOpICStub(Isolate* isolate, const BinaryOpIC::State& state)
+ BinaryOpICStub(Isolate* isolate, const BinaryOpIC::State& state)
: HydrogenCodeStub(isolate) {
set_sub_minor_key(state.GetExtraICState());
}
static const int kRight = 1;
private:
- virtual inline Major MajorKey() const OVERRIDE;
-
static void GenerateAheadOfTime(Isolate* isolate,
const BinaryOpIC::State& state);
- DISALLOW_COPY_AND_ASSIGN(BinaryOpICStub);
+ DEFINE_CODE_STUB(BinaryOpIC, HydrogenCodeStub);
};
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
BinaryOpIC::State state() const {
return BinaryOpIC::State(isolate(), static_cast<ExtraICState>(minor_key_));
}
static void GenerateAheadOfTime(Isolate* isolate,
const BinaryOpIC::State& state);
- DISALLOW_COPY_AND_ASSIGN(BinaryOpICWithAllocationSiteStub);
+ DEFINE_CODE_STUB(BinaryOpICWithAllocationSite, PlatformCodeStub);
};
virtual Handle<Code> GenerateCode() OVERRIDE;
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kAllocationSite = 0;
static const int kLeft = 1;
static const int kRight = 2;
+
+ DEFINE_CODE_STUB(BinaryOpWithAllocationSite, BinaryOpICStub);
};
static const int kRight = 1;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class StringAddFlagsBits: public BitField<StringAddFlags, 0, 2> {};
class PretenureFlagBits: public BitField<PretenureFlag, 2, 1> {};
virtual void PrintBaseName(OStream& os) const OVERRIDE; // NOLINT
- DISALLOW_COPY_AND_ASSIGN(StringAddStub);
+ DEFINE_CODE_STUB(StringAdd, HydrogenCodeStub);
};
void set_known_map(Handle<Map> map) { known_map_ = map; }
- explicit CompareICStub(uint32_t stub_key) : PlatformCodeStub(stub_key) {
- DCHECK_EQ(MajorKeyFromKey(stub_key), MajorKey());
- }
-
virtual InlineCacheState GetICState() const;
Token::Value op() const {
CompareIC::State state() const { return StateBits::decode(minor_key_); }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual Code::Kind GetCodeKind() const { return Code::COMPARE_IC; }
void GenerateSmis(MacroAssembler* masm);
Handle<Map> known_map_;
- DISALLOW_COPY_AND_ASSIGN(CompareICStub);
+ DEFINE_CODE_STUB(CompareIC, PlatformCodeStub);
};
set_sub_minor_key(NilValueBits::encode(nil));
}
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
enum CompareNilType {
UNDEFINED,
NULL_TYPE,
friend class CompareNilIC;
- DISALLOW_COPY_AND_ASSIGN(CompareNilICStub);
+ DEFINE_CODE_STUB(CompareNilIC, HydrogenCodeStub);
};
static void GenerateAheadOfTime(Isolate* isolate);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
#ifdef _WIN64
int result_size() const { return ResultSizeBits::decode(minor_key_); }
class SaveDoublesBits : public BitField<bool, 0, 1> {};
class ResultSizeBits : public BitField<int, 1, 3> {};
- DISALLOW_COPY_AND_ASSIGN(CEntryStub);
+ DEFINE_CODE_STUB(CEntry, PlatformCodeStub);
};
void GenerateBody(MacroAssembler* masm, bool is_construct);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void FinishCode(Handle<Code> code);
int handler_offset_;
- DISALLOW_COPY_AND_ASSIGN(JSEntryStub);
+ DEFINE_CODE_STUB(JSEntry, PlatformCodeStub);
};
class JSConstructEntryStub : public JSEntryStub {
public:
- explicit JSConstructEntryStub(Isolate* isolate) : JSEntryStub(isolate) {
- minor_key_ = 1;
- }
+ explicit JSConstructEntryStub(Isolate* isolate) : JSEntryStub(isolate) {}
void Generate(MacroAssembler* masm) { GenerateBody(masm, true); }
os << "JSConstructEntryStub";
}
- DISALLOW_COPY_AND_ASSIGN(JSConstructEntryStub);
+ DEFINE_CODE_STUB(JSConstructEntry, JSEntryStub);
};
}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
Type type() const { return TypeBits::decode(minor_key_); }
void Generate(MacroAssembler* masm);
class TypeBits : public BitField<Type, 0, 2> {};
- DISALLOW_COPY_AND_ASSIGN(ArgumentsAccessStub);
+ DEFINE_CODE_STUB(ArgumentsAccess, PlatformCodeStub);
};
explicit RegExpExecStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(RegExpExecStub);
+ DEFINE_CODE_STUB(RegExpExec, PlatformCodeStub);
};
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
static void InstallDescriptors(Isolate* isolate);
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kIndex = 1;
static const int kInput = 2;
- private:
- DISALLOW_COPY_AND_ASSIGN(RegExpConstructResultStub);
+ DEFINE_CODE_STUB(RegExpConstructResult, HydrogenCodeStub);
};
CodeStubInterfaceDescriptor* descriptor);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
int argc() const { return ArgcBits::decode(minor_key_); }
int flags() const { return FlagBits::decode(minor_key_); }
class ArgcBits : public BitField<unsigned, 2, Code::kArgumentsBits> {};
STATIC_ASSERT(Code::kArgumentsBits + 2 <= kStubMinorKeyBits);
- DISALLOW_COPY_AND_ASSIGN(CallFunctionStub);
+ DEFINE_CODE_STUB(CallFunction, PlatformCodeStub);
};
CodeStubInterfaceDescriptor* descriptor);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
CallConstructorFlags flags() const { return FlagBits::decode(minor_key_); }
bool RecordCallTarget() const {
class FlagBits : public BitField<CallConstructorFlags, 0, 1> {};
- DISALLOW_COPY_AND_ASSIGN(CallConstructStub);
+ DEFINE_CODE_STUB(CallConstruct, PlatformCodeStub);
};
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(LoadDictionaryElementStub);
+ DEFINE_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
};
virtual Code::Kind GetCodeKind() const { return Code::KEYED_LOAD_IC; }
virtual InlineCacheState GetICState() const { return GENERIC; }
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub);
+ DEFINE_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
};
return static_cast<ExtraICState>(minor_key_);
}
- virtual inline Major MajorKey() const OVERRIDE;
-
private:
LoadIC::State state() const {
return LoadIC::State(static_cast<ExtraICState>(minor_key_));
virtual void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub);
+ DEFINE_CODE_STUB(LoadICTrampoline, PlatformCodeStub);
};
return Code::KEYED_LOAD_IC;
}
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
private:
virtual void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub);
+ DEFINE_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub);
};
}
private:
- virtual inline Major MajorKey() const OVERRIDE;
-
LoadIC::State state() const { return LoadIC::State(GetExtraICState()); }
- DISALLOW_COPY_AND_ASSIGN(VectorLoadStub);
+ DEFINE_CODE_STUB(VectorLoad, HydrogenCodeStub);
};
return Code::KEYED_LOAD_IC;
}
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub);
+ DEFINE_CODE_STUB(VectorKeyedLoad, VectorLoadStub);
};
virtual bool SometimesSetsUpAFrame() { return false; }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
Register source() const {
return Register::from_code(SourceRegisterBits::decode(minor_key_));
}
class SSE3Bits:
public BitField<int, 2 * kBitsPerRegisterNumber + 5, 1> {}; // NOLINT
- DISALLOW_COPY_AND_ASSIGN(DoubleToIStub);
+ DEFINE_CODE_STUB(DoubleToI, PlatformCodeStub);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 8, 1> {};
- DISALLOW_COPY_AND_ASSIGN(LoadFastElementStub);
+ DEFINE_CODE_STUB(LoadFastElement, HydrogenCodeStub);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class StoreModeBits: public BitField<KeyedAccessStoreMode, 8, 4> {};
class IsJSArrayBits: public BitField<bool, 12, 1> {};
- DISALLOW_COPY_AND_ASSIGN(StoreFastElementStub);
+ DEFINE_CODE_STUB(StoreFastElement, HydrogenCodeStub);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class FromKindBits: public BitField<ElementsKind, 8, 8> {};
class ToKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 16, 1> {};
- DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub);
+ DEFINE_CODE_STUB(TransitionElementsKind, HydrogenCodeStub);
};
class AllocationSiteOverrideModeBits: public
BitField<AllocationSiteOverrideMode, 8, 1> {}; // NOLINT
- DISALLOW_COPY_AND_ASSIGN(ArrayConstructorStubBase);
+ DEFINE_CODE_STUB_BASE(ArrayConstructorStubBase, HydrogenCodeStub);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void PrintName(OStream& os) const OVERRIDE { // NOLINT
BasePrintName(os, "ArrayNoArgumentConstructorStub");
}
- DISALLOW_COPY_AND_ASSIGN(ArrayNoArgumentConstructorStub);
+ DEFINE_CODE_STUB(ArrayNoArgumentConstructor, ArrayConstructorStubBase);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void PrintName(OStream& os) const { // NOLINT
BasePrintName(os, "ArraySingleArgumentConstructorStub");
}
- DISALLOW_COPY_AND_ASSIGN(ArraySingleArgumentConstructorStub);
+ DEFINE_CODE_STUB(ArraySingleArgumentConstructor, ArrayConstructorStubBase);
};
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void PrintName(OStream& os) const { // NOLINT
BasePrintName(os, "ArrayNArgumentsConstructorStub");
}
- DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub);
+ DEFINE_CODE_STUB(ArrayNArgumentsConstructor, ArrayConstructorStubBase);
};
private:
class ElementsKindBits : public BitField<ElementsKind, 0, 8> {};
- DISALLOW_COPY_AND_ASSIGN(InternalArrayConstructorStubBase);
+ DEFINE_CODE_STUB_BASE(InternalArrayConstructorStubBase, HydrogenCodeStub);
};
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(InternalArrayNoArgumentConstructorStub);
+ DEFINE_CODE_STUB(InternalArrayNoArgumentConstructor,
+ InternalArrayConstructorStubBase);
};
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(InternalArraySingleArgumentConstructorStub);
+ DEFINE_CODE_STUB(InternalArraySingleArgumentConstructor,
+ InternalArrayConstructorStubBase);
};
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(InternalArrayNArgumentsConstructorStub);
+ DEFINE_CODE_STUB(InternalArrayNArgumentsConstructor,
+ InternalArrayConstructorStubBase);
};
void Generate(MacroAssembler* masm);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
ElementsKind elements_kind() const {
return ElementsKindBits::decode(minor_key_);
}
class ElementsKindBits : public BitField<ElementsKind, 0, 8> {};
- DISALLOW_COPY_AND_ASSIGN(StoreElementStub);
+ DEFINE_CODE_STUB(StoreElement, PlatformCodeStub);
};
set_sub_minor_key(ResultModeBits::encode(RESULT_AS_SMI));
}
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class TypesBits : public BitField<byte, 0, NUMBER_OF_TYPES> {};
class ResultModeBits : public BitField<ResultMode, NUMBER_OF_TYPES, 2> {};
- DISALLOW_COPY_AND_ASSIGN(ToBooleanStub);
+ DEFINE_CODE_STUB(ToBoolean, HydrogenCodeStub);
};
}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
class FromBits : public BitField<ElementsKind, 0, 8> {};
class ToBits : public BitField<ElementsKind, 8, 8> {};
class IsJSArrayBits : public BitField<bool, 16, 1> {};
class StoreModeBits : public BitField<KeyedAccessStoreMode, 17, 4> {};
- DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub);
+ DEFINE_CODE_STUB(ElementsTransitionAndStore, HydrogenCodeStub);
};
: PlatformCodeStub(isolate) { }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub);
+ DEFINE_CODE_STUB(StoreArrayLiteralElement, PlatformCodeStub);
};
static void GenerateAheadOfTime(Isolate* isolate);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
StubFunctionMode function_mode() const {
return FunctionModeField::decode(minor_key_);
}
class FunctionModeField : public BitField<StubFunctionMode, 0, 1> {};
- DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub);
+ DEFINE_CODE_STUB(StubFailureTrampoline, PlatformCodeStub);
};
intptr_t stack_pointer,
Isolate* isolate);
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
+ DEFINE_CODE_STUB(ProfileEntryHook, PlatformCodeStub);
};
virtual bool SometimesSetsUpAFrame() { return false; }
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
class SaveDoublesBits : public BitField<bool, 0, 1> {};
- DISALLOW_COPY_AND_ASSIGN(StoreBufferOverflowStub);
+ DEFINE_CODE_STUB(StoreBufferOverflow, PlatformCodeStub);
};
explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(SubStringStub);
+ DEFINE_CODE_STUB(SubString, PlatformCodeStub);
};
explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
virtual void Generate(MacroAssembler* masm);
- DISALLOW_COPY_AND_ASSIGN(StringCompareStub);
+ DEFINE_CODE_STUB(StringCompare, PlatformCodeStub);
};
-#define DEFINE_MAJOR_KEY(NAME) \
- CodeStub::Major NAME##Stub::MajorKey() const { return NAME; }
-
-CODE_STUB_LIST(DEFINE_MAJOR_KEY)
-
-#undef DEFINE_MAJOR_KEY
+#undef DEFINE_CODE_STUB
+#undef DEFINE_CODE_STUB_BASE
} } // namespace v8::internal
#endif // V8_CODE_STUBS_H_