Revision: 23655
Author: [email protected]
Date: Wed Sep 3 13:14:55 2014 UTC
Log: Clean up code stubs and ensure distinct major keys.
[email protected]
Review URL: https://codereview.chromium.org/530343005
https://code.google.com/p/v8/source/detail?r=23655
Modified:
/branches/bleeding_edge/src/arm/code-stubs-arm.cc
/branches/bleeding_edge/src/arm/code-stubs-arm.h
/branches/bleeding_edge/src/arm64/code-stubs-arm64.cc
/branches/bleeding_edge/src/arm64/code-stubs-arm64.h
/branches/bleeding_edge/src/code-stubs.cc
/branches/bleeding_edge/src/code-stubs.h
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
/branches/bleeding_edge/src/ia32/code-stubs-ia32.h
/branches/bleeding_edge/src/ic/arm/handler-compiler-arm.cc
/branches/bleeding_edge/src/ic/arm64/handler-compiler-arm64.cc
/branches/bleeding_edge/src/ic/handler-compiler.h
/branches/bleeding_edge/src/ic/ia32/handler-compiler-ia32.cc
/branches/bleeding_edge/src/ic/ic-compiler.cc
/branches/bleeding_edge/src/ic/ic.cc
/branches/bleeding_edge/src/ic/x64/handler-compiler-x64.cc
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/x64/code-stubs-x64.cc
/branches/bleeding_edge/src/x64/code-stubs-x64.h
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed Sep 3 11:41:54
2014 UTC
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed Sep 3 13:14:55
2014 UTC
@@ -578,8 +578,7 @@
}
-static void ICCompareStub_CheckInputType(MacroAssembler* masm,
- Register input,
+static void CompareICStub_CheckInputType(MacroAssembler* masm, Register
input,
Register scratch,
CompareIC::State expected,
Label* fail) {
@@ -600,14 +599,14 @@
// On entry r1 and r2 are the values to be compared.
// On exit r0 is 0, positive or negative to indicate the result of
// the comparison.
-void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
+void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
Register lhs = r1;
Register rhs = r0;
Condition cc = GetCondition();
Label miss;
- ICCompareStub_CheckInputType(masm, lhs, r2, left(), &miss);
- ICCompareStub_CheckInputType(masm, rhs, r3, right(), &miss);
+ CompareICStub_CheckInputType(masm, lhs, r2, left(), &miss);
+ CompareICStub_CheckInputType(masm, rhs, r3, right(), &miss);
Label slow; // Call builtin.
Label not_smis, both_loaded_as_doubles, lhs_not_nan;
@@ -3353,7 +3352,7 @@
}
-void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
+void CompareICStub::GenerateSmis(MacroAssembler* masm) {
DCHECK(state() == CompareIC::SMI);
Label miss;
__ orr(r2, r1, r0);
@@ -3374,7 +3373,7 @@
}
-void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
+void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
@@ -3426,7 +3425,7 @@
__ bind(&unordered);
__ bind(&generic_stub);
- ICCompareStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
+ CompareICStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
CompareIC::GENERIC);
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
@@ -3451,7 +3450,7 @@
}
-void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
Label miss;
@@ -3489,7 +3488,7 @@
}
-void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
+void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == eq);
Label miss;
@@ -3528,7 +3527,7 @@
}
-void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::STRING);
Label miss;
@@ -3607,7 +3606,7 @@
}
-void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateObjects(MacroAssembler* masm) {
DCHECK(state() == CompareIC::OBJECT);
Label miss;
__ and_(r2, r1, Operand(r0));
@@ -3627,7 +3626,7 @@
}
-void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
__ and_(r2, r1, Operand(r0));
__ JumpIfSmi(r2, &miss);
@@ -3646,8 +3645,7 @@
}
-
-void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
+void CompareICStub::GenerateMiss(MacroAssembler* masm) {
{
// Call the runtime system in a fresh internal frame.
ExternalReference miss =
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.h Wed Sep 3 11:41:54
2014 UTC
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.h Wed Sep 3 13:14:55
2014 UTC
@@ -86,7 +86,7 @@
static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
private:
- Major MajorKey() const { return WriteInt32ToHeapNumber; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -257,7 +257,7 @@
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- Major MajorKey() const { return RecordWrite; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
void GenerateIncremental(MacroAssembler* masm, Mode mode);
@@ -316,7 +316,7 @@
void GenerateCall(MacroAssembler* masm, Register target);
private:
- Major MajorKey() const { return DirectCEntry; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
bool NeedsImmovableCode() { return true; }
@@ -365,7 +365,7 @@
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- Major MajorKey() const { return NameDictionaryLookup; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
LookupMode mode() const { return LookupModeBits::decode(minor_key_); }
=======================================
--- /branches/bleeding_edge/src/arm64/code-stubs-arm64.cc Wed Sep 3
11:41:54 2014 UTC
+++ /branches/bleeding_edge/src/arm64/code-stubs-arm64.cc Wed Sep 3
13:14:55 2014 UTC
@@ -483,8 +483,7 @@
}
-static void ICCompareStub_CheckInputType(MacroAssembler* masm,
- Register input,
+static void CompareICStub_CheckInputType(MacroAssembler* masm, Register
input,
Register scratch,
CompareIC::State expected,
Label* fail) {
@@ -502,15 +501,15 @@
}
-void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
+void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
Register lhs = x1;
Register rhs = x0;
Register result = x0;
Condition cond = GetCondition();
Label miss;
- ICCompareStub_CheckInputType(masm, lhs, x2, left(), &miss);
- ICCompareStub_CheckInputType(masm, rhs, x3, right(), &miss);
+ CompareICStub_CheckInputType(masm, lhs, x2, left(), &miss);
+ CompareICStub_CheckInputType(masm, rhs, x3, right(), &miss);
Label slow; // Call builtin.
Label not_smis, both_loaded_as_doubles;
@@ -3197,10 +3196,10 @@
}
-void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
+void CompareICStub::GenerateSmis(MacroAssembler* masm) {
// Inputs are in x0 (lhs) and x1 (rhs).
DCHECK(state() == CompareIC::SMI);
- ASM_LOCATION("ICCompareStub[Smis]");
+ ASM_LOCATION("CompareICStub[Smis]");
Label miss;
// Bail out (to 'miss') unless both x0 and x1 are smis.
__ JumpIfEitherNotSmi(x0, x1, &miss);
@@ -3220,9 +3219,9 @@
}
-void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
+void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state() == CompareIC::NUMBER);
- ASM_LOCATION("ICCompareStub[HeapNumbers]");
+ ASM_LOCATION("CompareICStub[HeapNumbers]");
Label unordered, maybe_undefined1, maybe_undefined2;
Label miss, handle_lhs, values_in_d_regs;
@@ -3266,7 +3265,7 @@
__ Ret();
__ Bind(&unordered);
- ICCompareStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
+ CompareICStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
CompareIC::GENERIC);
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
@@ -3288,9 +3287,9 @@
}
-void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
- ASM_LOCATION("ICCompareStub[InternalizedStrings]");
+ ASM_LOCATION("CompareICStub[InternalizedStrings]");
Label miss;
Register result = x0;
@@ -3326,9 +3325,9 @@
}
-void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
+void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state() == CompareIC::UNIQUE_NAME);
- ASM_LOCATION("ICCompareStub[UniqueNames]");
+ ASM_LOCATION("CompareICStub[UniqueNames]");
DCHECK(GetCondition() == eq);
Label miss;
@@ -3365,9 +3364,9 @@
}
-void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::STRING);
- ASM_LOCATION("ICCompareStub[Strings]");
+ ASM_LOCATION("CompareICStub[Strings]");
Label miss;
@@ -3445,9 +3444,9 @@
}
-void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateObjects(MacroAssembler* masm) {
DCHECK(state() == CompareIC::OBJECT);
- ASM_LOCATION("ICCompareStub[Objects]");
+ ASM_LOCATION("CompareICStub[Objects]");
Label miss;
@@ -3469,8 +3468,8 @@
}
-void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
- ASM_LOCATION("ICCompareStub[KnownObjects]");
+void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
+ ASM_LOCATION("CompareICStub[KnownObjects]");
Label miss;
@@ -3499,10 +3498,10 @@
// This method handles the case where a compare stub had the wrong
// implementation. It calls a miss handler, which re-writes the stub. All
other
-// ICCompareStub::Generate* methods should fall back into this one if their
+// CompareICStub::Generate* methods should fall back into this one if their
// operands were not the expected types.
-void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
- ASM_LOCATION("ICCompareStub[Miss]");
+void CompareICStub::GenerateMiss(MacroAssembler* masm) {
+ ASM_LOCATION("CompareICStub[Miss]");
Register stub_entry = x11;
{
=======================================
--- /branches/bleeding_edge/src/arm64/code-stubs-arm64.h Wed Sep 3
11:59:24 2014 UTC
+++ /branches/bleeding_edge/src/arm64/code-stubs-arm64.h Wed Sep 3
13:14:55 2014 UTC
@@ -63,7 +63,7 @@
static void GenerateAheadOfTime(Isolate* isolate);
private:
- Major MajorKey() const { return StoreRegistersState; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -77,8 +77,9 @@
: PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
+
private:
- Major MajorKey() const { return RestoreRegistersState; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -293,7 +294,7 @@
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- Major MajorKey() const { return RecordWrite; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
void GenerateIncremental(MacroAssembler* masm, Mode mode);
@@ -347,7 +348,7 @@
void GenerateCall(MacroAssembler* masm, Register target);
private:
- Major MajorKey() const { return DirectCEntry; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
bool NeedsImmovableCode() { return true; }
@@ -396,7 +397,7 @@
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- Major MajorKey() const { return NameDictionaryLookup; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
LookupMode mode() const { return LookupModeBits::decode(minor_key_); }
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc Wed Sep 3 10:51:51 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.cc Wed Sep 3 13:14:55 2014 UTC
@@ -268,7 +268,7 @@
}
-InlineCacheState ICCompareStub::GetICState() const {
+InlineCacheState CompareICStub::GetICState() const {
CompareIC::State state = Max(left(), right());
switch (state) {
case CompareIC::UNINITIALIZED:
@@ -289,7 +289,7 @@
}
-void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
+void CompareICStub::AddToSpecialCache(Handle<Code> new_object) {
DCHECK(*known_map_ != NULL);
Isolate* isolate = new_object->GetIsolate();
Factory* factory = isolate->factory();
@@ -301,7 +301,7 @@
}
-bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) {
+bool CompareICStub::FindCodeInSpecialCache(Code** code_out) {
Factory* factory = isolate()->factory();
Code::Flags flags = Code::ComputeFlags(
GetCodeKind(),
@@ -317,7 +317,7 @@
if (probe->IsCode()) {
*code_out = Code::cast(*probe);
#ifdef DEBUG
- ICCompareStub decode((*code_out)->stub_key());
+ CompareICStub decode((*code_out)->stub_key());
DCHECK(op() == decode.op());
DCHECK(left() == decode.left());
DCHECK(right() == decode.right());
@@ -329,7 +329,7 @@
}
-void ICCompareStub::Generate(MacroAssembler* masm) {
+void CompareICStub::Generate(MacroAssembler* masm) {
switch (state()) {
case CompareIC::UNINITIALIZED:
GenerateMiss(masm);
@@ -717,11 +717,6 @@
descriptor->Initialize(MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kStringAdd)->entry);
}
-
-
-void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) {
- ElementHandlerCompiler::GenerateLoadDictionaryElement(masm);
-}
void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Wed Sep 3 11:41:54 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.h Wed Sep 3 13:14:55 2014 UTC
@@ -19,93 +19,88 @@
// List of code stubs used on all platforms.
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \
- V(CallFunction) \
- V(CallConstruct) \
- V(BinaryOpIC) \
+ /* PlatformCodeStubs */ \
+ V(ArgumentsAccess) \
+ V(ArrayConstructor) \
V(BinaryOpICWithAllocationSite) \
- V(BinaryOpWithAllocationSite) \
- V(StringAdd) \
- V(SubString) \
- V(StringCompare) \
- V(Compare) \
- V(CompareIC) \
- V(CompareNilIC) \
- V(MathPow) \
+ V(CallApiFunction) \
+ V(CallApiGetter) \
+ V(CallConstruct) \
+ V(CallFunction) \
V(CallIC) \
V(CallIC_Array) \
+ V(CEntry) \
+ V(CompareIC) \
+ V(DoubleToI) \
V(FunctionPrototype) \
- V(RecordWrite) \
- V(StoreBufferOverflow) \
- V(RegExpExec) \
V(Instanceof) \
- V(ConvertToDouble) \
- V(WriteInt32ToHeapNumber) \
- V(StackCheck) \
- V(Interrupt) \
- V(FastNewClosure) \
- V(FastNewContext) \
- V(FastCloneShallowArray) \
- V(FastCloneShallowObject) \
- V(CreateAllocationSite) \
- V(ToBoolean) \
- V(ToNumber) \
- V(ArgumentsAccess) \
- V(RegExpConstructResult) \
- V(NumberToString) \
- V(DoubleToI) \
- V(CEntry) \
+ V(InternalArrayConstructor) \
V(JSEntry) \
- V(LoadElement) \
- V(KeyedLoadGeneric) \
+ V(KeyedLoadICTrampoline) \
+ V(LoadICTrampoline) \
+ V(MathPow) \
+ V(ProfileEntryHook) \
+ V(RecordWrite) \
+ V(RegExpExec) \
+ V(StoreArrayLiteralElement) \
+ V(StoreBufferOverflow) \
+ V(StoreElement) \
+ V(StringCompare) \
+ V(StubFailureTrampoline) \
+ V(SubString) \
+ /* HydrogenCodeStubs */ \
+ V(ArrayNArgumentsConstructor) \
V(ArrayNoArgumentConstructor) \
V(ArraySingleArgumentConstructor) \
- V(ArrayNArgumentsConstructor) \
+ V(BinaryOpIC) \
+ V(BinaryOpWithAllocationSite) \
+ V(CompareNilIC) \
+ V(CreateAllocationSite) \
+ V(ElementsTransitionAndStore) \
+ V(FastCloneShallowArray) \
+ V(FastCloneShallowObject) \
+ V(FastNewClosure) \
+ V(FastNewContext) \
+ V(InternalArrayNArgumentsConstructor) \
V(InternalArrayNoArgumentConstructor) \
V(InternalArraySingleArgumentConstructor) \
- V(InternalArrayNArgumentsConstructor) \
- V(StoreElement) \
- V(DebuggerStatement) \
+ V(KeyedLoadGeneric) \
+ V(LoadDictionaryElement) \
+ V(LoadFastElement) \
V(NameDictionaryLookup) \
- V(ElementsTransitionAndStore) \
+ V(NumberToString) \
+ V(RegExpConstructResult) \
+ V(StoreFastElement) \
+ V(StringAdd) \
+ V(ToBoolean) \
+ V(ToNumber) \
V(TransitionElementsKind) \
- V(StoreArrayLiteralElement) \
- V(StubFailureTrampoline) \
- V(ArrayConstructor) \
- V(InternalArrayConstructor) \
- V(ProfileEntryHook) \
- V(StoreGlobal) \
- V(CallApiFunction) \
- V(CallApiGetter) \
- V(LoadICTrampoline) \
- V(VectorLoad) \
- V(KeyedLoadICTrampoline) \
V(VectorKeyedLoad) \
+ V(VectorLoad) \
/* IC Handler stubs */ \
+ V(LoadConstant) \
V(LoadField) \
V(StoreField) \
- V(LoadConstant) \
+ V(StoreGlobal) \
V(StringLength)
// List of code stubs only used on ARM 32 bits platforms.
#if V8_TARGET_ARCH_ARM
-#define CODE_STUB_LIST_ARM(V) \
- V(GetProperty) \
- V(SetProperty) \
- V(InvokeBuiltin) \
- V(DirectCEntry)
+#define CODE_STUB_LIST_ARM(V) \
+ V(DirectCEntry) \
+ V(WriteInt32ToHeapNumber)
+
#else
#define CODE_STUB_LIST_ARM(V)
#endif
// List of code stubs only used on ARM 64 bits platforms.
#if V8_TARGET_ARCH_ARM64
-#define CODE_STUB_LIST_ARM64(V) \
- V(GetProperty) \
- V(SetProperty) \
- V(InvokeBuiltin) \
- V(DirectCEntry) \
- V(StoreRegistersState) \
- V(RestoreRegistersState)
+#define CODE_STUB_LIST_ARM64(V) \
+ V(DirectCEntry) \
+ V(RestoreRegistersState) \
+ V(StoreRegistersState)
+
#else
#define CODE_STUB_LIST_ARM64(V)
#endif
@@ -526,7 +521,9 @@
}
private:
- virtual Major MajorKey() const OVERRIDE { return ToNumber; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(ToNumberStub);
};
@@ -545,7 +542,9 @@
static const int kNumber = 0;
private:
- virtual Major MajorKey() const OVERRIDE { return NumberToString; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(NumberToStringStub);
};
@@ -572,7 +571,7 @@
bool is_generator() const { return
IsGeneratorBits::decode(sub_minor_key()); }
private:
- virtual Major MajorKey() const OVERRIDE { return FastNewClosure; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class StrictModeBits : public BitField<StrictMode, 0, 1> {};
class IsGeneratorBits : public BitField<bool, 1, 1> {};
@@ -603,7 +602,7 @@
static const int kFunction = 0;
private:
- virtual Major MajorKey() const OVERRIDE { return FastNewContext; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class SlotsBits : public BitField<int, 0, 8> {};
@@ -631,7 +630,7 @@
static void InstallDescriptors(Isolate* isolate);
private:
- virtual Major MajorKey() const OVERRIDE { return FastCloneShallowArray; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1>
{};
@@ -659,7 +658,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE { return FastCloneShallowObject;
}
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class LengthBits : public BitField<int, 0, 4> {};
@@ -680,7 +679,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE { return CreateAllocationSite; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(CreateAllocationSiteStub);
};
@@ -708,7 +707,7 @@
CodeStubInterfaceDescriptor* descriptor);
private:
- virtual Major MajorKey() const OVERRIDE { return Instanceof; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
Flags flags() const { return FlagBits::decode(minor_key_); }
@@ -747,7 +746,7 @@
void Generate(MacroAssembler* masm);
private:
- virtual Major MajorKey() const OVERRIDE { return ArrayConstructor; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
ArgumentCountKey argument_count() const {
return ArgumentCountBits::decode(minor_key_);
@@ -771,9 +770,7 @@
void Generate(MacroAssembler* masm);
private:
- virtual Major MajorKey() const OVERRIDE {
- return InternalArrayConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void GenerateCase(MacroAssembler* masm, ElementsKind kind);
@@ -793,7 +790,7 @@
virtual void Generate(MacroAssembler* masm);
private:
- virtual Major MajorKey() const OVERRIDE { return MathPow; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
ExponentType exponent_type() const {
return ExponentTypeBits::decode(minor_key_);
@@ -840,7 +837,7 @@
void GenerateMiss(MacroAssembler* masm, IC::UtilityId id);
private:
- virtual Major MajorKey() const OVERRIDE { return CallIC; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
@@ -860,9 +857,9 @@
}
private:
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
+
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
-
- virtual Major MajorKey() const OVERRIDE { return CallIC_Array; }
DISALLOW_COPY_AND_ASSIGN(CallIC_ArrayStub);
};
@@ -877,7 +874,7 @@
virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
private:
- virtual Major MajorKey() const OVERRIDE { return FunctionPrototype; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(FunctionPrototypeStub);
};
@@ -921,7 +918,7 @@
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual Major MajorKey() const OVERRIDE { return LoadField; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
@@ -948,7 +945,7 @@
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual Major MajorKey() const OVERRIDE { return LoadConstant; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {};
@@ -966,7 +963,7 @@
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual Major MajorKey() const OVERRIDE { return StringLength; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(StringLengthStub);
};
@@ -1003,7 +1000,7 @@
virtual Code::StubType GetStubType() { return Code::FAST; }
private:
- virtual Major MajorKey() const OVERRIDE { return StoreField; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
class RepresentationBits : public BitField<uint8_t, 13, 4> {};
@@ -1061,7 +1058,7 @@
}
private:
- virtual Major MajorKey() const OVERRIDE { return StoreGlobal; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class IsConstantBits: public BitField<bool, 0, 1> {};
class RepresentationBits: public BitField<Representation::Kind, 1, 8> {};
@@ -1084,8 +1081,9 @@
}
private:
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
+
virtual void Generate(MacroAssembler* masm) OVERRIDE;
- virtual Major MajorKey() const OVERRIDE { return CallApiFunction; }
bool is_store() const { return IsStoreBits::decode(minor_key_); }
bool call_data_undefined() const {
@@ -1108,7 +1106,7 @@
private:
virtual void Generate(MacroAssembler* masm) OVERRIDE;
- virtual Major MajorKey() const OVERRIDE { return CallApiGetter; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(CallApiGetterStub);
};
@@ -1160,7 +1158,7 @@
static const int kRight = 1;
private:
- virtual Major MajorKey() const OVERRIDE { return BinaryOpIC; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
static void GenerateAheadOfTime(Isolate* isolate,
const BinaryOpIC::State& state);
@@ -1203,11 +1201,9 @@
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
- virtual Major MajorKey() const OVERRIDE {
- return BinaryOpICWithAllocationSite;
- }
+ private:
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
- private:
BinaryOpIC::State state() const {
return BinaryOpIC::State(isolate(),
static_cast<ExtraICState>(minor_key_));
}
@@ -1241,9 +1237,7 @@
virtual Handle<Code> GenerateCode() OVERRIDE;
- virtual Major MajorKey() const OVERRIDE {
- return BinaryOpWithAllocationSite;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kAllocationSite = 0;
@@ -1293,7 +1287,7 @@
static const int kRight = 1;
private:
- virtual Major MajorKey() const OVERRIDE { return StringAdd; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class StringAddFlagsBits: public BitField<StringAddFlags, 0, 2> {};
class PretenureFlagBits: public BitField<PretenureFlag, 2, 1> {};
@@ -1304,9 +1298,9 @@
};
-class ICCompareStub: public PlatformCodeStub {
+class CompareICStub : public PlatformCodeStub {
public:
- ICCompareStub(Isolate* isolate, Token::Value op, CompareIC::State left,
+ CompareICStub(Isolate* isolate, Token::Value op, CompareIC::State left,
CompareIC::State right, CompareIC::State state)
: PlatformCodeStub(isolate) {
DCHECK(Token::IsCompareOp(op));
@@ -1318,7 +1312,7 @@
void set_known_map(Handle<Map> map) { known_map_ = map; }
- explicit ICCompareStub(uint32_t stub_key) : PlatformCodeStub(stub_key) {
+ explicit CompareICStub(uint32_t stub_key) : PlatformCodeStub(stub_key) {
DCHECK_EQ(MajorKeyFromKey(stub_key), MajorKey());
}
@@ -1333,7 +1327,7 @@
CompareIC::State state() const { return StateBits::decode(minor_key_); }
private:
- virtual Major MajorKey() const OVERRIDE { return CompareIC; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual Code::Kind GetCodeKind() const { return Code::COMPARE_IC; }
@@ -1361,7 +1355,7 @@
Handle<Map> known_map_;
- DISALLOW_COPY_AND_ASSIGN(ICCompareStub);
+ DISALLOW_COPY_AND_ASSIGN(CompareICStub);
};
@@ -1431,7 +1425,7 @@
set_sub_minor_key(NilValueBits::encode(nil));
}
- virtual Major MajorKey() const OVERRIDE { return CompareNilIC; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
enum CompareNilType {
UNDEFINED,
@@ -1488,7 +1482,7 @@
static void GenerateAheadOfTime(Isolate* isolate);
private:
- virtual Major MajorKey() const OVERRIDE { return CEntry; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
#ifdef _WIN64
@@ -1514,7 +1508,7 @@
void GenerateBody(MacroAssembler* masm, bool is_construct);
private:
- virtual Major MajorKey() const OVERRIDE { return JSEntry; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual void FinishCode(Handle<Code> code);
@@ -1555,7 +1549,7 @@
}
private:
- virtual Major MajorKey() const OVERRIDE { return ArgumentsAccess; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
Type type() const { return TypeBits::decode(minor_key_); }
@@ -1578,7 +1572,7 @@
explicit RegExpExecStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
private:
- virtual Major MajorKey() const OVERRIDE { return RegExpExec; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -1596,7 +1590,7 @@
virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
- virtual Major MajorKey() const OVERRIDE { return RegExpConstructResult; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
static void InstallDescriptors(Isolate* isolate);
@@ -1628,7 +1622,7 @@
CodeStubInterfaceDescriptor* descriptor);
private:
- virtual Major MajorKey() const OVERRIDE { return CallFunction; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
int argc() const { return ArgcBits::decode(minor_key_); }
int flags() const { return FlagBits::decode(minor_key_); }
@@ -1667,7 +1661,7 @@
CodeStubInterfaceDescriptor* descriptor);
private:
- virtual Major MajorKey() const OVERRIDE { return CallConstruct; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
CallConstructorFlags flags() const { return
FlagBits::decode(minor_key_); }
@@ -1860,9 +1854,7 @@
class LoadDictionaryElementStub : public HydrogenCodeStub {
public:
explicit LoadDictionaryElementStub(Isolate* isolate)
- : HydrogenCodeStub(isolate) {
- set_sub_minor_key(DICTIONARY_ELEMENTS);
- }
+ : HydrogenCodeStub(isolate) {}
virtual Handle<Code> GenerateCode() OVERRIDE;
@@ -1870,28 +1862,12 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE { return LoadElement; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(LoadDictionaryElementStub);
};
-class LoadDictionaryElementPlatformStub : public PlatformCodeStub {
- public:
- explicit LoadDictionaryElementPlatformStub(Isolate* isolate)
- : PlatformCodeStub(isolate) {
- minor_key_ = DICTIONARY_ELEMENTS;
- }
-
- void Generate(MacroAssembler* masm);
-
- private:
- virtual Major MajorKey() const OVERRIDE { return LoadElement; }
-
- DISALLOW_COPY_AND_ASSIGN(LoadDictionaryElementPlatformStub);
-};
-
-
class KeyedLoadGenericStub : public HydrogenCodeStub {
public:
explicit KeyedLoadGenericStub(Isolate* isolate) :
HydrogenCodeStub(isolate) {}
@@ -1907,7 +1883,7 @@
virtual InlineCacheState GetICState() const { return GENERIC; }
private:
- virtual Major MajorKey() const OVERRIDE { return KeyedLoadGeneric; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub);
};
@@ -1930,7 +1906,7 @@
return static_cast<ExtraICState>(minor_key_);
}
- virtual Major MajorKey() const OVERRIDE { return LoadICTrampoline; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
private:
LoadIC::State state() const {
@@ -1952,7 +1928,7 @@
return Code::KEYED_LOAD_IC;
}
- virtual Major MajorKey() const OVERRIDE { return KeyedLoadICTrampoline; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
private:
virtual void Generate(MacroAssembler* masm);
@@ -1986,7 +1962,7 @@
}
private:
- virtual Major MajorKey() const OVERRIDE { return VectorLoad; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
LoadIC::State state() const { return LoadIC::State(GetExtraICState()); }
@@ -2010,9 +1986,9 @@
return Code::KEYED_LOAD_IC;
}
- virtual Major MajorKey() const OVERRIDE { return VectorKeyedLoad; }
+ private:
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
- private:
DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub);
};
@@ -2035,7 +2011,7 @@
virtual bool SometimesSetsUpAFrame() { return false; }
private:
- virtual Major MajorKey() const OVERRIDE { return DoubleToI; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
Register source() const {
return Register::from_code(SourceRegisterBits::decode(minor_key_));
@@ -2090,7 +2066,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE { return LoadElement; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 8, 1> {};
@@ -2125,7 +2101,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE { return StoreElement; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class StoreModeBits: public BitField<KeyedAccessStoreMode, 8, 4> {};
@@ -2160,7 +2136,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE { return TransitionElementsKind;
}
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class FromKindBits: public BitField<ElementsKind, 8, 8> {};
class ToKindBits: public BitField<ElementsKind, 0, 8> {};
@@ -2230,9 +2206,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE {
- return ArrayNoArgumentConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual void PrintName(OStream& os) const OVERRIDE { // NOLINT
BasePrintName(os, "ArrayNoArgumentConstructorStub");
@@ -2257,9 +2231,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE {
- return ArraySingleArgumentConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual void PrintName(OStream& os) const { // NOLINT
BasePrintName(os, "ArraySingleArgumentConstructorStub");
@@ -2284,9 +2256,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE {
- return ArrayNArgumentsConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual void PrintName(OStream& os) const { // NOLINT
BasePrintName(os, "ArrayNArgumentsConstructorStub");
@@ -2333,9 +2303,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE {
- return InternalArrayNoArgumentConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(InternalArrayNoArgumentConstructorStub);
};
@@ -2354,9 +2322,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE {
- return InternalArraySingleArgumentConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(InternalArraySingleArgumentConstructorStub);
};
@@ -2374,9 +2340,7 @@
CodeStubInterfaceDescriptor* descriptor) OVERRIDE;
private:
- virtual Major MajorKey() const OVERRIDE {
- return InternalArrayNArgumentsConstructor;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(InternalArrayNArgumentsConstructorStub);
};
@@ -2392,7 +2356,7 @@
void Generate(MacroAssembler* masm);
private:
- virtual Major MajorKey() const OVERRIDE { return StoreElement; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
ElementsKind elements_kind() const {
return ElementsKindBits::decode(minor_key_);
@@ -2488,12 +2452,12 @@
}
private:
- virtual Major MajorKey() const OVERRIDE { return ToBoolean; }
-
ToBooleanStub(Isolate* isolate, InitializationState init_state)
: HydrogenCodeStub(isolate, init_state) {
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>
{};
@@ -2551,9 +2515,7 @@
}
private:
- virtual Major MajorKey() const OVERRIDE {
- return ElementsTransitionAndStore;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
class FromBits : public BitField<ElementsKind, 0, 8> {};
class ToBits : public BitField<ElementsKind, 8, 8> {};
@@ -2570,9 +2532,7 @@
: PlatformCodeStub(isolate) { }
private:
- virtual Major MajorKey() const OVERRIDE {
- return StoreArrayLiteralElement;
- }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -2590,7 +2550,7 @@
static void GenerateAheadOfTime(Isolate* isolate);
private:
- virtual Major MajorKey() const OVERRIDE { return StubFailureTrampoline; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
StubFunctionMode function_mode() const {
return FunctionModeField::decode(minor_key_);
@@ -2619,7 +2579,7 @@
intptr_t stack_pointer,
Isolate* isolate);
- virtual Major MajorKey() const OVERRIDE { return ProfileEntryHook; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -2640,7 +2600,7 @@
virtual bool SometimesSetsUpAFrame() { return false; }
private:
- Major MajorKey() const OVERRIDE { return StoreBufferOverflow; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
@@ -2655,7 +2615,7 @@
explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
private:
- Major MajorKey() const OVERRIDE { return SubString; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
@@ -2668,12 +2628,20 @@
explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate)
{}
private:
- virtual Major MajorKey() const { return StringCompare; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
virtual void Generate(MacroAssembler* masm);
DISALLOW_COPY_AND_ASSIGN(StringCompareStub);
};
+
+
+#define DEFINE_MAJOR_KEY(NAME) \
+ CodeStub::Major NAME##Stub::MajorKey() const { return NAME; }
+
+CODE_STUB_LIST(DEFINE_MAJOR_KEY)
+
+#undef DEFINE_MAJOR_KEY
} } // namespace v8::internal
#endif // V8_CODE_STUBS_H_
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Mon Sep 1 12:54:22 2014
UTC
+++ /branches/bleeding_edge/src/flag-definitions.h Wed Sep 3 13:14:55 2014
UTC
@@ -178,8 +178,6 @@
DEFINE_IMPLICATION(es_staging, harmony_generators)
// Flags for experimental implementation features.
-DEFINE_BOOL(compiled_keyed_dictionary_loads, true,
- "use optimizing compiler to generate keyed dictionary load
stubs")
DEFINE_BOOL(compiled_keyed_generic_loads, false,
"use optimizing compiler to generate keyed generic load stubs")
DEFINE_BOOL(clever_optimizations, true,
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Sep 3 11:41:54
2014 UTC
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Sep 3 13:14:55
2014 UTC
@@ -1568,7 +1568,7 @@
}
-void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
+void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
Label check_unequal_objects;
Condition cc = GetCondition();
@@ -3375,7 +3375,7 @@
}
-void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
+void CompareICStub::GenerateSmis(MacroAssembler* masm) {
DCHECK(state() == CompareIC::SMI);
Label miss;
__ mov(ecx, edx);
@@ -3401,7 +3401,7 @@
}
-void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
+void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
@@ -3458,7 +3458,7 @@
__ bind(&unordered);
__ bind(&generic_stub);
- ICCompareStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
+ CompareICStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
CompareIC::GENERIC);
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
@@ -3483,7 +3483,7 @@
}
-void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
DCHECK(GetCondition() == equal);
@@ -3528,7 +3528,7 @@
}
-void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
+void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == equal);
@@ -3573,7 +3573,7 @@
}
-void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::STRING);
Label miss;
@@ -3662,7 +3662,7 @@
}
-void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateObjects(MacroAssembler* masm) {
DCHECK(state() == CompareIC::OBJECT);
Label miss;
__ mov(ecx, edx);
@@ -3683,7 +3683,7 @@
}
-void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
__ mov(ecx, edx);
__ and_(ecx, eax);
@@ -3704,7 +3704,7 @@
}
-void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
+void CompareICStub::GenerateMiss(MacroAssembler* masm) {
{
// Call the runtime system in a fresh internal frame.
ExternalReference miss =
ExternalReference(IC_Utility(IC::kCompareIC_Miss),
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.h Wed Sep 3 11:41:54
2014 UTC
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.h Wed Sep 3 13:14:55
2014 UTC
@@ -114,7 +114,7 @@
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- Major MajorKey() const { return NameDictionaryLookup; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
Register dictionary() const {
return Register::from_code(DictionaryBits::decode(minor_key_));
@@ -359,7 +359,7 @@
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- Major MajorKey() const { return RecordWrite; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
void GenerateIncremental(MacroAssembler* masm, Mode mode);
=======================================
--- /branches/bleeding_edge/src/ic/arm/handler-compiler-arm.cc Wed Sep 3
10:51:51 2014 UTC
+++ /branches/bleeding_edge/src/ic/arm/handler-compiler-arm.cc Wed Sep 3
13:14:55 2014 UTC
@@ -284,34 +284,6 @@
CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
__ TailCallStub(&stub);
}
-
-
-void ElementHandlerCompiler::GenerateLoadDictionaryElement(
- MacroAssembler* masm) {
- // The return address is in lr.
- Label slow, miss;
-
- Register key = LoadDescriptor::NameRegister();
- Register receiver = LoadDescriptor::ReceiverRegister();
- DCHECK(receiver.is(r1));
- DCHECK(key.is(r2));
-
- __ UntagAndJumpIfNotSmi(r6, key, &miss);
- __ ldr(r4, FieldMemOperand(receiver, JSObject::kElementsOffset));
- __ LoadFromNumberDictionary(&slow, r4, key, r0, r6, r3, r5);
- __ Ret();
-
- __ bind(&slow);
- __ IncrementCounter(
- masm->isolate()->counters()->keyed_load_external_array_slow(), 1,
r2, r3);
-
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
-
- // Miss case, call the runtime.
- __ bind(&miss);
-
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
-}
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/ic/arm64/handler-compiler-arm64.cc Wed Sep
3 10:51:51 2014 UTC
+++ /branches/bleeding_edge/src/ic/arm64/handler-compiler-arm64.cc Wed Sep
3 13:14:55 2014 UTC
@@ -277,33 +277,6 @@
}
__ Ret();
}
-
-
-void ElementHandlerCompiler::GenerateLoadDictionaryElement(
- MacroAssembler* masm) {
- // The return address is in lr.
- Label slow, miss;
-
- Register result = x0;
- Register key = LoadDescriptor::NameRegister();
- Register receiver = LoadDescriptor::ReceiverRegister();
- DCHECK(receiver.is(x1));
- DCHECK(key.is(x2));
-
- __ JumpIfNotSmi(key, &miss);
- __ Ldr(x4, FieldMemOperand(receiver, JSObject::kElementsOffset));
- __ LoadFromNumberDictionary(&slow, x4, key, result, x7, x3, x5, x6);
- __ Ret();
-
- __ Bind(&slow);
- __ IncrementCounter(
- masm->isolate()->counters()->keyed_load_external_array_slow(), 1,
x4, x3);
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
-
- // Miss case, call the runtime.
- __ Bind(&miss);
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
-}
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/ic/handler-compiler.h Mon Aug 25 11:20:43
2014 UTC
+++ /branches/bleeding_edge/src/ic/handler-compiler.h Wed Sep 3 13:14:55
2014 UTC
@@ -268,7 +268,6 @@
void CompileElementHandlers(MapHandleList* receiver_maps,
CodeHandleList* handlers);
- static void GenerateLoadDictionaryElement(MacroAssembler* masm);
static void GenerateStoreSlow(MacroAssembler* masm);
};
}
=======================================
--- /branches/bleeding_edge/src/ic/ia32/handler-compiler-ia32.cc Wed Sep 3
10:51:51 2014 UTC
+++ /branches/bleeding_edge/src/ic/ia32/handler-compiler-ia32.cc Wed Sep 3
13:14:55 2014 UTC
@@ -13,52 +13,6 @@
namespace internal {
#define __ ACCESS_MASM(masm)
-
-
-void ElementHandlerCompiler::GenerateLoadDictionaryElement(
- MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- ecx : key
- // -- edx : receiver
- // -- esp[0] : return address
- // -----------------------------------
- DCHECK(edx.is(LoadDescriptor::ReceiverRegister()));
- DCHECK(ecx.is(LoadDescriptor::NameRegister()));
- Label slow, miss;
-
- // This stub is meant to be tail-jumped to, the receiver must already
- // have been verified by the caller to not be a smi.
- __ JumpIfNotSmi(ecx, &miss);
- __ mov(ebx, ecx);
- __ SmiUntag(ebx);
- __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset));
-
- // Push receiver on the stack to free up a register for the dictionary
- // probing.
- __ push(edx);
- __ LoadFromNumberDictionary(&slow, eax, ecx, ebx, edx, edi, eax);
- // Pop receiver before returning.
- __ pop(edx);
- __ ret(0);
-
- __ bind(&slow);
- __ pop(edx);
-
- // ----------- S t a t e -------------
- // -- ecx : key
- // -- edx : receiver
- // -- esp[0] : return address
- // -----------------------------------
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
-
- __ bind(&miss);
- // ----------- S t a t e -------------
- // -- ecx : key
- // -- edx : receiver
- // -- esp[0] : return address
- // -----------------------------------
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
-}
void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
=======================================
--- /branches/bleeding_edge/src/ic/ic-compiler.cc Tue Aug 26 10:39:20 2014
UTC
+++ /branches/bleeding_edge/src/ic/ic-compiler.cc Wed Sep 3 13:14:55 2014
UTC
@@ -101,9 +101,7 @@
receiver_map->instance_type() ==
JS_ARRAY_TYPE,
elements_kind).GetCode();
} else {
- stub = FLAG_compiled_keyed_dictionary_loads
- ? LoadDictionaryElementStub(isolate).GetCode()
- : LoadDictionaryElementPlatformStub(isolate).GetCode();
+ stub = LoadDictionaryElementStub(isolate).GetCode();
}
PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
Handle<Code> code =
=======================================
--- /branches/bleeding_edge/src/ic/ic.cc Tue Sep 2 13:36:35 2014 UTC
+++ /branches/bleeding_edge/src/ic/ic.cc Wed Sep 3 13:14:55 2014 UTC
@@ -548,7 +548,7 @@
void CompareIC::Clear(Isolate* isolate, Address address, Code* target,
ConstantPoolArray* constant_pool) {
DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC);
- ICCompareStub stub(target->stub_key());
+ CompareICStub stub(target->stub_key());
// Only clear CompareICs that can retain objects.
if (stub.state() != KNOWN_OBJECT) return;
SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()),
@@ -2676,7 +2676,7 @@
Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op) {
- ICCompareStub stub(isolate, op, UNINITIALIZED, UNINITIALIZED,
UNINITIALIZED);
+ CompareICStub stub(isolate, op, UNINITIALIZED, UNINITIALIZED,
UNINITIALIZED);
Code* code = NULL;
CHECK(stub.FindCodeInCache(&code));
return code;
@@ -2684,7 +2684,7 @@
Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value
op) {
- ICCompareStub stub(isolate, op, UNINITIALIZED, UNINITIALIZED,
UNINITIALIZED);
+ CompareICStub stub(isolate, op, UNINITIALIZED, UNINITIALIZED,
UNINITIALIZED);
return stub.GetCode();
}
@@ -2745,7 +2745,7 @@
void CompareIC::StubInfoToType(uint32_t stub_key, Type** left_type,
Type** right_type, Type** overall_type,
Handle<Map> map, Zone* zone) {
- ICCompareStub stub(stub_key);
+ CompareICStub stub(stub_key);
*left_type = StateToType(zone, stub.left());
*right_type = StateToType(zone, stub.right());
*overall_type = StateToType(zone, stub.state(), map);
@@ -2858,12 +2858,12 @@
Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
HandleScope scope(isolate());
- ICCompareStub old_stub(target()->stub_key());
+ CompareICStub old_stub(target()->stub_key());
State new_left = NewInputState(old_stub.left(), x);
State new_right = NewInputState(old_stub.right(), y);
State state = TargetState(old_stub.state(), old_stub.left(),
old_stub.right(),
HasInlinedSmiCode(address()), x, y);
- ICCompareStub stub(isolate(), op_, new_left, new_right, state);
+ CompareICStub stub(isolate(), op_, new_left, new_right, state);
if (state == KNOWN_OBJECT) {
stub.set_known_map(
Handle<Map>(Handle<JSObject>::cast(x)->map(), isolate()));
@@ -2890,7 +2890,7 @@
}
-// Used from ICCompareStub::GenerateMiss in code-stubs-<arch>.cc.
+// Used from CompareICStub::GenerateMiss in code-stubs-<arch>.cc.
RUNTIME_FUNCTION(CompareIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate);
=======================================
--- /branches/bleeding_edge/src/ic/x64/handler-compiler-x64.cc Wed Sep 3
10:51:51 2014 UTC
+++ /branches/bleeding_edge/src/ic/x64/handler-compiler-x64.cc Wed Sep 3
13:14:55 2014 UTC
@@ -274,50 +274,6 @@
}
__ ret(0);
}
-
-
-void ElementHandlerCompiler::GenerateLoadDictionaryElement(
- MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- rcx : key
- // -- rdx : receiver
- // -- rsp[0] : return address
- // -----------------------------------
- DCHECK(rdx.is(LoadDescriptor::ReceiverRegister()));
- DCHECK(rcx.is(LoadDescriptor::NameRegister()));
- Label slow, miss;
-
- // This stub is meant to be tail-jumped to, the receiver must already
- // have been verified by the caller to not be a smi.
-
- __ JumpIfNotSmi(rcx, &miss);
- __ SmiToInteger32(rbx, rcx);
- __ movp(rax, FieldOperand(rdx, JSObject::kElementsOffset));
-
- // Check whether the elements is a number dictionary.
- // rdx: receiver
- // rcx: key
- // rbx: key as untagged int32
- // rax: elements
- __ LoadFromNumberDictionary(&slow, rax, rcx, rbx, r9, rdi, rax);
- __ ret(0);
-
- __ bind(&slow);
- // ----------- S t a t e -------------
- // -- rcx : key
- // -- rdx : receiver
- // -- rsp[0] : return address
- // -----------------------------------
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
-
- __ bind(&miss);
- // ----------- S t a t e -------------
- // -- rcx : key
- // -- rdx : receiver
- // -- rsp[0] : return address
- // -----------------------------------
- TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
-}
static void StoreIC_PushArgs(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/objects.cc Tue Sep 2 13:36:35 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Wed Sep 3 13:14:55 2014 UTC
@@ -10902,7 +10902,7 @@
}
if (is_compare_ic_stub()) {
DCHECK(CodeStub::GetMajorKey(this) == CodeStub::CompareIC);
- ICCompareStub stub(stub_key());
+ CompareICStub stub(stub_key());
os << "compare_state = " << CompareIC::GetStateName(stub.left())
<< "*"
<< CompareIC::GetStateName(stub.right()) << " -> "
<< CompareIC::GetStateName(stub.state()) << "\n";
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Wed Sep 3 11:41:54
2014 UTC
+++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Wed Sep 3 13:14:55
2014 UTC
@@ -1432,7 +1432,7 @@
}
-void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
+void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
Label check_unequal_objects, done;
Condition cc = GetCondition();
Factory* factory = isolate()->factory();
@@ -3331,7 +3331,7 @@
}
-void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
+void CompareICStub::GenerateSmis(MacroAssembler* masm) {
DCHECK(state() == CompareIC::SMI);
Label miss;
__ JumpIfNotBothSmi(rdx, rax, &miss, Label::kNear);
@@ -3355,7 +3355,7 @@
}
-void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
+void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
@@ -3407,7 +3407,7 @@
__ bind(&unordered);
__ bind(&generic_stub);
- ICCompareStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
+ CompareICStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
CompareIC::GENERIC);
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
@@ -3432,7 +3432,7 @@
}
-void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
DCHECK(GetCondition() == equal);
@@ -3475,7 +3475,7 @@
}
-void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
+void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == equal);
@@ -3518,7 +3518,7 @@
}
-void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::STRING);
Label miss;
@@ -3604,7 +3604,7 @@
}
-void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateObjects(MacroAssembler* masm) {
DCHECK(state() == CompareIC::OBJECT);
Label miss;
Condition either_smi = masm->CheckEitherSmi(rdx, rax);
@@ -3624,7 +3624,7 @@
}
-void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
Condition either_smi = masm->CheckEitherSmi(rdx, rax);
__ j(either_smi, &miss, Label::kNear);
@@ -3644,7 +3644,7 @@
}
-void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
+void CompareICStub::GenerateMiss(MacroAssembler* masm) {
{
// Call the runtime system in a fresh internal frame.
ExternalReference miss =
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.h Wed Sep 3 11:41:54
2014 UTC
+++ /branches/bleeding_edge/src/x64/code-stubs-x64.h Wed Sep 3 13:14:55
2014 UTC
@@ -110,7 +110,7 @@
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- Major MajorKey() const { return NameDictionaryLookup; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
Register dictionary() const {
return Register::from_code(DictionaryBits::decode(minor_key_));
@@ -334,7 +334,7 @@
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- Major MajorKey() const { return RecordWrite; }
+ virtual inline Major MajorKey() const FINAL OVERRIDE;
void Generate(MacroAssembler* masm);
void GenerateIncremental(MacroAssembler* masm, Mode mode);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.