Reviewers: Weiliang, Yang,
Message:
weiliang.
PTAL
thanks
Description:
X87: Minor-key-ify four stubs.
port r23605.
orginal commit message:
- Minor-key-ify four stubs.
- ICCompareStub
- BinaryOpICStub
- CompareNilICStub - VectorLoadStub
BUG=
Please review this at https://codereview.chromium.org/534883002/
SVN Base: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Affected files (+17, -18 lines):
M src/x87/code-stubs-x87.h
M src/x87/code-stubs-x87.cc
M src/x87/macro-assembler-x87.cc
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index
637ec65e683321e80dc5badc64c529e0684d85fd..94d13a0bc95ae7e7810fa2867853f2d15b0dcec8
100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -1247,8 +1247,8 @@ void ICCompareStub::GenerateGeneric(MacroAssembler*
masm) {
Condition cc = GetCondition();
Label miss;
- CheckInputType(masm, edx, left_, &miss);
- CheckInputType(masm, eax, right_, &miss);
+ CheckInputType(masm, edx, left(), &miss);
+ CheckInputType(masm, eax, right(), &miss);
// Compare two smis.
Label non_smi, smi_done;
@@ -3070,7 +3070,7 @@ void
BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
- DCHECK(state_ == CompareIC::SMI);
+ DCHECK(state() == CompareIC::SMI);
Label miss;
__ mov(ecx, edx);
__ or_(ecx, eax);
@@ -3096,16 +3096,16 @@ void ICCompareStub::GenerateSmis(MacroAssembler*
masm) {
void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
- DCHECK(state_ == CompareIC::NUMBER);
+ DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
Label unordered, maybe_undefined1, maybe_undefined2;
Label miss;
- if (left_ == CompareIC::SMI) {
+ if (left() == CompareIC::SMI) {
__ JumpIfNotSmi(edx, &miss);
}
- if (right_ == CompareIC::SMI) {
+ if (right() == CompareIC::SMI) {
__ JumpIfNotSmi(eax, &miss);
}
@@ -3124,12 +3124,12 @@ void ICCompareStub::GenerateNumbers(MacroAssembler*
masm) {
__ bind(&unordered);
__ bind(&generic_stub);
- ICCompareStub stub(isolate(), op_, CompareIC::GENERIC,
CompareIC::GENERIC,
+ ICCompareStub stub(isolate(), op(), CompareIC::GENERIC,
CompareIC::GENERIC,
CompareIC::GENERIC);
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
__ bind(&maybe_undefined1);
- if (Token::IsOrderedRelationalCompareOp(op_)) {
+ if (Token::IsOrderedRelationalCompareOp(op())) {
__ cmp(eax, Immediate(isolate()->factory()->undefined_value()));
__ j(not_equal, &miss);
__ JumpIfSmi(edx, &unordered);
@@ -3139,7 +3139,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler*
masm) {
}
__ bind(&maybe_undefined2);
- if (Token::IsOrderedRelationalCompareOp(op_)) {
+ if (Token::IsOrderedRelationalCompareOp(op())) {
__ cmp(edx, Immediate(isolate()->factory()->undefined_value()));
__ j(equal, &unordered);
}
@@ -3150,7 +3150,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler*
masm) {
void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
- DCHECK(state_ == CompareIC::INTERNALIZED_STRING);
+ DCHECK(state() == CompareIC::INTERNALIZED_STRING);
DCHECK(GetCondition() == equal);
// Registers containing left and right operands respectively.
@@ -3195,7 +3195,7 @@ void
ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
- DCHECK(state_ == CompareIC::UNIQUE_NAME);
+ DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == equal);
// Registers containing left and right operands respectively.
@@ -3240,10 +3240,10 @@ void
ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
- DCHECK(state_ == CompareIC::STRING);
+ DCHECK(state() == CompareIC::STRING);
Label miss;
- bool equality = Token::IsEqualityOp(op_);
+ bool equality = Token::IsEqualityOp(op());
// Registers containing left and right operands respectively.
Register left = edx;
@@ -3330,7 +3330,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler*
masm) {
void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
- DCHECK(state_ == CompareIC::OBJECT);
+ DCHECK(state() == CompareIC::OBJECT);
Label miss;
__ mov(ecx, edx);
__ and_(ecx, eax);
@@ -3381,7 +3381,7 @@ void ICCompareStub::GenerateMiss(MacroAssembler*
masm) {
__ push(eax);
__ push(edx); // And also use them as the arguments.
__ push(eax);
- __ push(Immediate(Smi::FromInt(op_)));
+ __ push(Immediate(Smi::FromInt(op())));
__ CallExternalReference(miss, 3);
// Compute the entry point of the rewritten stub.
__ lea(edi, FieldOperand(eax, Code::kHeaderSize));
Index: src/x87/code-stubs-x87.h
diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h
index
5f42573f6cf84fc0c1a70e34cb82184bd934761a..039ee63ab3063cbc84a455dcb0bfc2f7a5c55893
100644
--- a/src/x87/code-stubs-x87.h
+++ b/src/x87/code-stubs-x87.h
@@ -16,7 +16,7 @@ void ArrayNativeCode(MacroAssembler* masm,
Label* call_generic_code);
-class StoreBufferOverflowStub: public PlatformCodeStub {
+class StoreBufferOverflowStub : public PlatformCodeStub {
public:
explicit StoreBufferOverflowStub(Isolate* isolate)
: PlatformCodeStub(isolate) { }
Index: src/x87/macro-assembler-x87.cc
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
index
6196d8f7ae468ea2e65077818989e16f903729d6..af286d9809e382cb99e39d9571696e3480b1938a
100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -178,8 +178,7 @@ void MacroAssembler::RememberedSetHelper(
DCHECK(and_then == kFallThroughAtEnd);
j(equal, &done, Label::kNear);
}
- StoreBufferOverflowStub store_buffer_overflow =
- StoreBufferOverflowStub(isolate());
+ StoreBufferOverflowStub store_buffer_overflow(isolate());
CallStub(&store_buffer_overflow);
if (and_then == kReturnAtEnd) {
ret(0);
--
--
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.