Clean up code stubs and ensure distinct major keys.
R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/530343005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
25efa1e88c
commit
62ba2c8b7f
@ -578,8 +578,7 @@ static void EmitCheckForInternalizedStringsOrObjects(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
|
||||
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 @@ static void ICCompareStub_CheckInputType(MacroAssembler* masm,
|
||||
// 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 BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateSmis(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::NUMBER);
|
||||
|
||||
Label generic_stub;
|
||||
@ -3426,7 +3425,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
|
||||
__ 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::GenerateNumbers(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
|
||||
Label miss;
|
||||
|
||||
@ -3489,7 +3488,7 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateStrings(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::STRING);
|
||||
Label miss;
|
||||
|
||||
@ -3607,7 +3606,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateMiss(MacroAssembler* masm) {
|
||||
{
|
||||
// Call the runtime system in a fresh internal frame.
|
||||
ExternalReference miss =
|
||||
|
@ -86,7 +86,7 @@ class WriteInt32ToHeapNumberStub : public PlatformCodeStub {
|
||||
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 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
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 @@ class DirectCEntryStub: public PlatformCodeStub {
|
||||
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 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
|
||||
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_); }
|
||||
|
||||
|
@ -483,8 +483,7 @@ static void EmitCheckForInternalizedStringsOrObjects(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
|
||||
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 @@ static void ICCompareStub_CheckInputType(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
|
||||
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 StringCharFromCodeGenerator::GenerateSlow(
|
||||
}
|
||||
|
||||
|
||||
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::GenerateSmis(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
__ 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::GenerateNumbers(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
ASM_LOCATION("ICCompareStub[KnownObjects]");
|
||||
void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
ASM_LOCATION("CompareICStub[KnownObjects]");
|
||||
|
||||
Label miss;
|
||||
|
||||
@ -3499,10 +3498,10 @@ void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
|
||||
// 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;
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ class StoreRegistersStateStub: public PlatformCodeStub {
|
||||
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 @@ class RestoreRegistersStateStub: public PlatformCodeStub {
|
||||
: 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 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
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 @@ class DirectCEntryStub: public PlatformCodeStub {
|
||||
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 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
|
||||
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_); }
|
||||
|
||||
|
@ -268,7 +268,7 @@ void StringAddStub::PrintBaseName(OStream& os) const { // NOLINT
|
||||
}
|
||||
|
||||
|
||||
InlineCacheState ICCompareStub::GetICState() const {
|
||||
InlineCacheState CompareICStub::GetICState() const {
|
||||
CompareIC::State state = Max(left(), right());
|
||||
switch (state) {
|
||||
case CompareIC::UNINITIALIZED:
|
||||
@ -289,7 +289,7 @@ InlineCacheState ICCompareStub::GetICState() const {
|
||||
}
|
||||
|
||||
|
||||
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 @@ void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
|
||||
}
|
||||
|
||||
|
||||
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 @@ bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) {
|
||||
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 @@ bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::Generate(MacroAssembler* masm) {
|
||||
void CompareICStub::Generate(MacroAssembler* masm) {
|
||||
switch (state()) {
|
||||
case CompareIC::UNINITIALIZED:
|
||||
GenerateMiss(masm);
|
||||
@ -719,11 +719,6 @@ void StringAddStub::InitializeInterfaceDescriptor(
|
||||
}
|
||||
|
||||
|
||||
void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) {
|
||||
ElementHandlerCompiler::GenerateLoadDictionaryElement(masm);
|
||||
}
|
||||
|
||||
|
||||
void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||
CreateAllocationSiteStub stub(isolate);
|
||||
stub.GetCode();
|
||||
|
320
src/code-stubs.h
320
src/code-stubs.h
@ -19,93 +19,88 @@ namespace internal {
|
||||
|
||||
// List of code stubs used on all platforms.
|
||||
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \
|
||||
V(CallFunction) \
|
||||
V(CallConstruct) \
|
||||
V(BinaryOpIC) \
|
||||
V(BinaryOpICWithAllocationSite) \
|
||||
V(BinaryOpWithAllocationSite) \
|
||||
V(StringAdd) \
|
||||
V(SubString) \
|
||||
V(StringCompare) \
|
||||
V(Compare) \
|
||||
V(CompareIC) \
|
||||
V(CompareNilIC) \
|
||||
V(MathPow) \
|
||||
V(CallIC) \
|
||||
V(CallIC_Array) \
|
||||
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) \
|
||||
/* PlatformCodeStubs */ \
|
||||
V(ArgumentsAccess) \
|
||||
V(RegExpConstructResult) \
|
||||
V(NumberToString) \
|
||||
V(DoubleToI) \
|
||||
V(CEntry) \
|
||||
V(JSEntry) \
|
||||
V(LoadElement) \
|
||||
V(KeyedLoadGeneric) \
|
||||
V(ArrayNoArgumentConstructor) \
|
||||
V(ArraySingleArgumentConstructor) \
|
||||
V(ArrayNArgumentsConstructor) \
|
||||
V(InternalArrayNoArgumentConstructor) \
|
||||
V(InternalArraySingleArgumentConstructor) \
|
||||
V(InternalArrayNArgumentsConstructor) \
|
||||
V(StoreElement) \
|
||||
V(DebuggerStatement) \
|
||||
V(NameDictionaryLookup) \
|
||||
V(ElementsTransitionAndStore) \
|
||||
V(TransitionElementsKind) \
|
||||
V(StoreArrayLiteralElement) \
|
||||
V(StubFailureTrampoline) \
|
||||
V(ArrayConstructor) \
|
||||
V(InternalArrayConstructor) \
|
||||
V(ProfileEntryHook) \
|
||||
V(StoreGlobal) \
|
||||
V(BinaryOpICWithAllocationSite) \
|
||||
V(CallApiFunction) \
|
||||
V(CallApiGetter) \
|
||||
V(LoadICTrampoline) \
|
||||
V(VectorLoad) \
|
||||
V(CallConstruct) \
|
||||
V(CallFunction) \
|
||||
V(CallIC) \
|
||||
V(CallIC_Array) \
|
||||
V(CEntry) \
|
||||
V(CompareIC) \
|
||||
V(DoubleToI) \
|
||||
V(FunctionPrototype) \
|
||||
V(Instanceof) \
|
||||
V(InternalArrayConstructor) \
|
||||
V(JSEntry) \
|
||||
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(BinaryOpIC) \
|
||||
V(BinaryOpWithAllocationSite) \
|
||||
V(CompareNilIC) \
|
||||
V(CreateAllocationSite) \
|
||||
V(ElementsTransitionAndStore) \
|
||||
V(FastCloneShallowArray) \
|
||||
V(FastCloneShallowObject) \
|
||||
V(FastNewClosure) \
|
||||
V(FastNewContext) \
|
||||
V(InternalArrayNArgumentsConstructor) \
|
||||
V(InternalArrayNoArgumentConstructor) \
|
||||
V(InternalArraySingleArgumentConstructor) \
|
||||
V(KeyedLoadGeneric) \
|
||||
V(LoadDictionaryElement) \
|
||||
V(LoadFastElement) \
|
||||
V(NameDictionaryLookup) \
|
||||
V(NumberToString) \
|
||||
V(RegExpConstructResult) \
|
||||
V(StoreFastElement) \
|
||||
V(StringAdd) \
|
||||
V(ToBoolean) \
|
||||
V(ToNumber) \
|
||||
V(TransitionElementsKind) \
|
||||
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 @@ class ToNumberStub: public HydrogenCodeStub {
|
||||
}
|
||||
|
||||
private:
|
||||
virtual Major MajorKey() const OVERRIDE { return ToNumber; }
|
||||
virtual inline Major MajorKey() const FINAL OVERRIDE;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ToNumberStub);
|
||||
};
|
||||
|
||||
|
||||
@ -545,7 +542,9 @@ class NumberToStringStub FINAL : public HydrogenCodeStub {
|
||||
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 @@ class FastNewClosureStub : public HydrogenCodeStub {
|
||||
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 @@ class FastNewContextStub FINAL : public HydrogenCodeStub {
|
||||
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 @@ class FastCloneShallowArrayStub : public HydrogenCodeStub {
|
||||
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 @@ class FastCloneShallowObjectStub : public HydrogenCodeStub {
|
||||
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 @@ class CreateAllocationSiteStub : public HydrogenCodeStub {
|
||||
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 @@ class InstanceofStub: public PlatformCodeStub {
|
||||
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 @@ class ArrayConstructorStub: public PlatformCodeStub {
|
||||
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 @@ class InternalArrayConstructorStub: public PlatformCodeStub {
|
||||
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 @@ class MathPowStub: public PlatformCodeStub {
|
||||
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 @@ class CallICStub: public PlatformCodeStub {
|
||||
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 @@ class CallIC_ArrayStub: public CallICStub {
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
|
||||
virtual inline Major MajorKey() const FINAL OVERRIDE;
|
||||
|
||||
virtual Major MajorKey() const OVERRIDE { return CallIC_Array; }
|
||||
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CallIC_ArrayStub);
|
||||
};
|
||||
@ -877,7 +874,7 @@ class FunctionPrototypeStub : public PlatformCodeStub {
|
||||
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 @@ class LoadFieldStub: public HandlerStub {
|
||||
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 @@ class LoadConstantStub : public HandlerStub {
|
||||
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 @@ class StringLengthStub: public HandlerStub {
|
||||
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 @@ class StoreFieldStub : public HandlerStub {
|
||||
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 @@ class StoreGlobalStub : public HandlerStub {
|
||||
}
|
||||
|
||||
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 @@ class CallApiFunctionStub : public PlatformCodeStub {
|
||||
}
|
||||
|
||||
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 @@ class CallApiGetterStub : public PlatformCodeStub {
|
||||
|
||||
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 @@ class BinaryOpICStub : public HydrogenCodeStub {
|
||||
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 @@ class BinaryOpICWithAllocationSiteStub FINAL : public PlatformCodeStub {
|
||||
|
||||
virtual void PrintState(OStream& os) const OVERRIDE; // NOLINT
|
||||
|
||||
virtual Major MajorKey() const OVERRIDE {
|
||||
return BinaryOpICWithAllocationSite;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual inline Major MajorKey() const FINAL OVERRIDE;
|
||||
|
||||
BinaryOpIC::State state() const {
|
||||
return BinaryOpIC::State(isolate(), static_cast<ExtraICState>(minor_key_));
|
||||
}
|
||||
@ -1241,9 +1237,7 @@ class BinaryOpWithAllocationSiteStub FINAL : public BinaryOpICStub {
|
||||
|
||||
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 @@ class StringAddStub FINAL : public HydrogenCodeStub {
|
||||
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 StringAddStub FINAL : public HydrogenCodeStub {
|
||||
};
|
||||
|
||||
|
||||
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 @@ class ICCompareStub: public PlatformCodeStub {
|
||||
|
||||
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 @@ class ICCompareStub: public PlatformCodeStub {
|
||||
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 @@ class ICCompareStub: public PlatformCodeStub {
|
||||
|
||||
Handle<Map> known_map_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ICCompareStub);
|
||||
DISALLOW_COPY_AND_ASSIGN(CompareICStub);
|
||||
};
|
||||
|
||||
|
||||
@ -1431,7 +1425,7 @@ class CompareNilICStub : public HydrogenCodeStub {
|
||||
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 @@ class CEntryStub : public PlatformCodeStub {
|
||||
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 @@ class JSEntryStub : public PlatformCodeStub {
|
||||
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 @@ class ArgumentsAccessStub: public PlatformCodeStub {
|
||||
}
|
||||
|
||||
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 @@ class RegExpExecStub: public PlatformCodeStub {
|
||||
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 @@ class RegExpConstructResultStub FINAL : public HydrogenCodeStub {
|
||||
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 @@ class CallFunctionStub: public PlatformCodeStub {
|
||||
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 @@ class CallConstructStub: public PlatformCodeStub {
|
||||
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 StringCharAtGenerator {
|
||||
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 @@ class LoadDictionaryElementStub : public HydrogenCodeStub {
|
||||
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 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
|
||||
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 @@ class LoadICTrampolineStub : public PlatformCodeStub {
|
||||
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 @@ class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
|
||||
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 @@ class VectorLoadStub : public HydrogenCodeStub {
|
||||
}
|
||||
|
||||
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 @@ class VectorKeyedLoadStub : public VectorLoadStub {
|
||||
return Code::KEYED_LOAD_IC;
|
||||
}
|
||||
|
||||
virtual Major MajorKey() const OVERRIDE { return VectorKeyedLoad; }
|
||||
|
||||
private:
|
||||
virtual inline Major MajorKey() const FINAL OVERRIDE;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub);
|
||||
};
|
||||
|
||||
@ -2035,7 +2011,7 @@ class DoubleToIStub : public PlatformCodeStub {
|
||||
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 @@ class LoadFastElementStub : public HydrogenCodeStub {
|
||||
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 @@ class StoreFastElementStub : public HydrogenCodeStub {
|
||||
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 @@ class TransitionElementsKindStub : public HydrogenCodeStub {
|
||||
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 @@ class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase {
|
||||
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 @@ class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
|
||||
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 @@ class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
|
||||
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 @@ class InternalArrayNoArgumentConstructorStub : public
|
||||
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 @@ class InternalArraySingleArgumentConstructorStub : public
|
||||
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 @@ class InternalArrayNArgumentsConstructorStub : public
|
||||
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 @@ class StoreElementStub : public PlatformCodeStub {
|
||||
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,13 +2452,13 @@ class ToBooleanStub: public HydrogenCodeStub {
|
||||
}
|
||||
|
||||
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 @@ class ElementsTransitionAndStoreStub : public HydrogenCodeStub {
|
||||
}
|
||||
|
||||
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 @@ class StoreArrayLiteralElementStub : public PlatformCodeStub {
|
||||
: 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 @@ class StubFailureTrampolineStub : public PlatformCodeStub {
|
||||
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 @@ class ProfileEntryHookStub : public PlatformCodeStub {
|
||||
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 @@ class StoreBufferOverflowStub : public PlatformCodeStub {
|
||||
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 @@ class SubStringStub : public PlatformCodeStub {
|
||||
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 @@ class StringCompareStub : public PlatformCodeStub {
|
||||
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_
|
||||
|
@ -178,8 +178,6 @@ DEFINE_IMPLICATION(harmony, es_staging)
|
||||
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,
|
||||
|
@ -1568,7 +1568,7 @@ static void BranchIfNotInternalizedString(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
|
||||
Label check_unequal_objects;
|
||||
Condition cc = GetCondition();
|
||||
|
||||
@ -3375,7 +3375,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateSmis(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::NUMBER);
|
||||
|
||||
Label generic_stub;
|
||||
@ -3458,7 +3458,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
|
||||
__ 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::GenerateNumbers(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
|
||||
DCHECK(GetCondition() == equal);
|
||||
|
||||
@ -3528,7 +3528,7 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::UNIQUE_NAME);
|
||||
DCHECK(GetCondition() == equal);
|
||||
|
||||
@ -3573,7 +3573,7 @@ void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateStrings(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::STRING);
|
||||
Label miss;
|
||||
|
||||
@ -3662,7 +3662,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
__ mov(ecx, edx);
|
||||
__ and_(ecx, eax);
|
||||
@ -3704,7 +3704,7 @@ void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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),
|
||||
|
@ -114,7 +114,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
|
||||
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 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
|
||||
};
|
||||
|
||||
Major MajorKey() const { return RecordWrite; }
|
||||
virtual inline Major MajorKey() const FINAL OVERRIDE;
|
||||
|
||||
void Generate(MacroAssembler* masm);
|
||||
void GenerateIncremental(MacroAssembler* masm, Mode mode);
|
||||
|
@ -286,34 +286,6 @@ void PropertyHandlerCompiler::GenerateFastApiCall(
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
// Push receiver, key and value for runtime call.
|
||||
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
|
||||
|
@ -279,33 +279,6 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
// Push receiver, name and value for runtime call.
|
||||
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
|
||||
|
@ -268,7 +268,6 @@ class ElementHandlerCompiler : public PropertyHandlerCompiler {
|
||||
void CompileElementHandlers(MapHandleList* receiver_maps,
|
||||
CodeHandleList* handlers);
|
||||
|
||||
static void GenerateLoadDictionaryElement(MacroAssembler* masm);
|
||||
static void GenerateStoreSlow(MacroAssembler* masm);
|
||||
};
|
||||
}
|
||||
|
@ -15,52 +15,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(
|
||||
MacroAssembler* masm, Handle<HeapType> type, Register receiver,
|
||||
Handle<JSFunction> getter) {
|
||||
|
@ -101,9 +101,7 @@ Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphic(
|
||||
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 =
|
||||
|
14
src/ic/ic.cc
14
src/ic/ic.cc
@ -548,7 +548,7 @@ void KeyedStoreIC::Clear(Isolate* isolate, Address address, Code* target,
|
||||
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 @@ RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite) {
|
||||
|
||||
|
||||
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 @@ Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op) {
|
||||
|
||||
|
||||
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 @@ Type* CompareIC::StateToType(Zone* zone, CompareIC::State state,
|
||||
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 @@ CompareIC::State CompareIC::TargetState(State old_state, State old_left,
|
||||
|
||||
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 @@ Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
|
||||
}
|
||||
|
||||
|
||||
// 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);
|
||||
|
@ -276,50 +276,6 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
Register receiver = StoreDescriptor::ReceiverRegister();
|
||||
Register name = StoreDescriptor::NameRegister();
|
||||
|
@ -10902,7 +10902,7 @@ void Code::Disassemble(const char* name, OStream& os) { // NOLINT
|
||||
}
|
||||
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";
|
||||
|
@ -1432,7 +1432,7 @@ static void BranchIfNotInternalizedString(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
|
||||
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 BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateSmis(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::NUMBER);
|
||||
|
||||
Label generic_stub;
|
||||
@ -3407,7 +3407,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
||||
|
||||
__ 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::GenerateNumbers(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
|
||||
DCHECK(GetCondition() == equal);
|
||||
|
||||
@ -3475,7 +3475,7 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::UNIQUE_NAME);
|
||||
DCHECK(GetCondition() == equal);
|
||||
|
||||
@ -3518,7 +3518,7 @@ void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateStrings(MacroAssembler* masm) {
|
||||
DCHECK(state() == CompareIC::STRING);
|
||||
Label miss;
|
||||
|
||||
@ -3604,7 +3604,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
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::GenerateKnownObjects(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
|
||||
void CompareICStub::GenerateMiss(MacroAssembler* masm) {
|
||||
{
|
||||
// Call the runtime system in a fresh internal frame.
|
||||
ExternalReference miss =
|
||||
|
@ -110,7 +110,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
|
||||
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 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
|
||||
};
|
||||
|
||||
Major MajorKey() const { return RecordWrite; }
|
||||
virtual inline Major MajorKey() const FINAL OVERRIDE;
|
||||
|
||||
void Generate(MacroAssembler* masm);
|
||||
void GenerateIncremental(MacroAssembler* masm, Mode mode);
|
||||
|
Loading…
Reference in New Issue
Block a user