Reviewers: Weiliang, Yang,
Description:
X87: Clean up code stubs and ensure distinct major keys.
port r23655.
original commit message:
Clean up code stubs and ensure distinct major keys.
BUG=
Please review this at https://codereview.chromium.org/543013002/
SVN Base: https://github.com/v8/v8.git@bleeding_edge
Affected files (+12, -58 lines):
M src/ic/x87/handler-compiler-x87.cc
M src/x87/code-stubs-x87.h
M src/x87/code-stubs-x87.cc
Index: src/ic/x87/handler-compiler-x87.cc
diff --git a/src/ic/x87/handler-compiler-x87.cc
b/src/ic/x87/handler-compiler-x87.cc
index
9ecba477c8dee6c039746a8f1f3bc1b566824a2f..ec08b60692b6e00bb12cd955e46d9bab8c42f307
100644
--- a/src/ic/x87/handler-compiler-x87.cc
+++ b/src/ic/x87/handler-compiler-x87.cc
@@ -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) {
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index
ad663392ab0670839398db87bd4b4412c6890ad3..a84438f4351a36d806c9cfc41f097003390b4686
100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -1239,7 +1239,7 @@ static void
BranchIfNotInternalizedString(MacroAssembler* masm,
}
-void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
+void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
Label check_unequal_objects;
Condition cc = GetCondition();
@@ -3050,7 +3050,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);
@@ -3076,7 +3076,7 @@ void ICCompareStub::GenerateSmis(MacroAssembler*
masm) {
}
-void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
+void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
@@ -3105,7 +3105,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);
@@ -3130,7 +3130,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler*
masm) {
}
-void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
DCHECK(GetCondition() == equal);
@@ -3175,7 +3175,7 @@ void
ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
}
-void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
+void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == equal);
@@ -3220,7 +3220,7 @@ void
ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
}
-void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
+void CompareICStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state() == CompareIC::STRING);
Label miss;
@@ -3309,7 +3309,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);
@@ -3330,7 +3330,7 @@ void ICCompareStub::GenerateObjects(MacroAssembler*
masm) {
}
-void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm) {
+void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
__ mov(ecx, edx);
__ and_(ecx, eax);
@@ -3351,7 +3351,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),
Index: src/x87/code-stubs-x87.h
diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h
index
03c9bedfbd81d8b43aa8d535636586b718e4e600..67f229305b6c29f2756138ff39ccd4f2a6cdc5c3
100644
--- a/src/x87/code-stubs-x87.h
+++ b/src/x87/code-stubs-x87.h
@@ -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_));
@@ -338,7 +338,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);
--
--
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.