From: titzer@chromium.org Date: Wed, 24 Jul 2013 10:48:16 +0000 (+0000) Subject: Remove HCompareConstantEqAndBranch (never used), and its corresponding Lithium instru... X-Git-Tag: upstream/4.7.83~13230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82a54b0077dd4334d650156518d52ca46bbf6ecf;p=platform%2Fupstream%2Fv8.git Remove HCompareConstantEqAndBranch (never used), and its corresponding Lithium instructions. BUG= R=bmeurer@chromium.org, mvstanton@chromium.org Review URL: https://codereview.chromium.org/19691005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc index a84045b..07f007d 100644 --- a/src/arm/lithium-arm.cc +++ b/src/arm/lithium-arm.cc @@ -1726,13 +1726,6 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( } -LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( - HCompareConstantEqAndBranch* instr) { - LOperand* value = UseRegisterAtStart(instr->value()); - return new(zone()) LCmpConstantEqAndBranch(value); -} - - LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h index 2055e6a..616b2da 100644 --- a/src/arm/lithium-arm.h +++ b/src/arm/lithium-arm.h @@ -74,7 +74,6 @@ class LCodeGen; V(ClampIToUint8) \ V(ClampTToUint8) \ V(ClassOfTestAndBranch) \ - V(CmpConstantEqAndBranch) \ V(CompareNumericAndBranch) \ V(CmpObjectEqAndBranch) \ V(CmpMapAndBranch) \ @@ -889,20 +888,6 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { - public: - explicit LCmpConstantEqAndBranch(LOperand* left) { - inputs_[0] = left; - } - - LOperand* left() { return inputs_[0]; } - - DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, - "cmp-constant-eq-and-branch") - DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) -}; - - class LIsObjectAndBranch: public LControlInstruction<1, 1> { public: LIsObjectAndBranch(LOperand* value, LOperand* temp) { diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index fab5a1b..1463166 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -2366,14 +2366,6 @@ void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { } -void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { - Register left = ToRegister(instr->left()); - - __ cmp(left, Operand(instr->hydrogen()->right())); - EmitBranch(instr, eq); -} - - Condition LCodeGen::EmitIsObject(Register input, Register temp1, Label* is_not_object, diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index ad27465..b6dc53e 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -101,7 +101,6 @@ class LChunkBuilder; V(CompareGeneric) \ V(CompareObjectEqAndBranch) \ V(CompareMap) \ - V(CompareConstantEqAndBranch) \ V(Constant) \ V(Context) \ V(DateField) \ @@ -3968,29 +3967,6 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { }; -class HCompareConstantEqAndBranch: public HUnaryControlInstruction { - public: - HCompareConstantEqAndBranch(HValue* left, int right, Token::Value op) - : HUnaryControlInstruction(left, NULL, NULL), op_(op), right_(right) { - ASSERT(op == Token::EQ_STRICT); - } - - Token::Value op() const { return op_; } - HValue* left() { return value(); } - int right() const { return right_; } - - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Integer32(); - } - - DECLARE_CONCRETE_INSTRUCTION(CompareConstantEqAndBranch); - - private: - const Token::Value op_; - const int right_; -}; - - class HIsObjectAndBranch: public HUnaryControlInstruction { public: explicit HIsObjectAndBranch(HValue* value) diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index f92ab17..2435e5f 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -2420,14 +2420,6 @@ void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { } -void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { - Register left = ToRegister(instr->left()); - - __ cmp(left, instr->hydrogen()->right()); - EmitBranch(instr, equal); -} - - Condition LCodeGen::EmitIsObject(Register input, Register temp1, Label* is_not_object, diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index e903519..aec96e0 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -1736,13 +1736,6 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( } -LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( - HCompareConstantEqAndBranch* instr) { - return new(zone()) LCmpConstantEqAndBranch( - UseRegisterAtStart(instr->value())); -} - - LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { ASSERT(instr->value()->representation().IsSmiOrTagged()); LOperand* temp = TempRegister(); diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h index 9dd97c1..85c0468 100644 --- a/src/ia32/lithium-ia32.h +++ b/src/ia32/lithium-ia32.h @@ -79,7 +79,6 @@ class LCodeGen; V(CmpObjectEqAndBranch) \ V(CmpMapAndBranch) \ V(CmpT) \ - V(CmpConstantEqAndBranch) \ V(ConstantD) \ V(ConstantI) \ V(ConstantS) \ @@ -858,20 +857,6 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { - public: - explicit LCmpConstantEqAndBranch(LOperand* left) { - inputs_[0] = left; - } - - LOperand* left() { return inputs_[0]; } - - DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, - "cmp-constant-eq-and-branch") - DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) -}; - - class LIsObjectAndBranch: public LControlInstruction<1, 1> { public: LIsObjectAndBranch(LOperand* value, LOperand* temp) { diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 4ff896d..c16467c 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -2232,13 +2232,6 @@ void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { } -void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { - Register left = ToRegister(instr->left()); - - EmitBranch(instr, eq, left, Operand(instr->hydrogen()->right())); -} - - Condition LCodeGen::EmitIsObject(Register input, Register temp1, Register temp2, diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 553dd49..242e88f 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -1647,13 +1647,6 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( } -LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( - HCompareConstantEqAndBranch* instr) { - return new(zone()) LCmpConstantEqAndBranch( - UseRegisterAtStart(instr->value())); -} - - LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* temp = TempRegister(); diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h index 574a836..2b55906 100644 --- a/src/mips/lithium-mips.h +++ b/src/mips/lithium-mips.h @@ -74,7 +74,6 @@ class LCodeGen; V(ClampIToUint8) \ V(ClampTToUint8) \ V(ClassOfTestAndBranch) \ - V(CmpConstantEqAndBranch) \ V(CompareNumericAndBranch) \ V(CmpObjectEqAndBranch) \ V(CmpMapAndBranch) \ @@ -882,20 +881,6 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { - public: - explicit LCmpConstantEqAndBranch(LOperand* left) { - inputs_[0] = left; - } - - LOperand* left() { return inputs_[0]; } - - DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, - "cmp-constant-eq-and-branch") - DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) -}; - - class LIsObjectAndBranch: public LControlInstruction<1, 1> { public: LIsObjectAndBranch(LOperand* value, LOperand* temp) { diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc index 0da9337..c7dd7df 100644 --- a/src/x64/lithium-codegen-x64.cc +++ b/src/x64/lithium-codegen-x64.cc @@ -2081,14 +2081,6 @@ void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { } -void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { - Register left = ToRegister(instr->left()); - - __ cmpq(left, Immediate(instr->hydrogen()->right())); - EmitBranch(instr, equal); -} - - Condition LCodeGen::EmitIsObject(Register input, Label* is_not_object, Label* is_object) { diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index 25c22cc..1f1098e 100644 --- a/src/x64/lithium-x64.cc +++ b/src/x64/lithium-x64.cc @@ -1647,13 +1647,6 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( } -LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( - HCompareConstantEqAndBranch* instr) { - LOperand* value = UseRegisterAtStart(instr->value()); - return new(zone()) LCmpConstantEqAndBranch(value); -} - - LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); return new(zone()) LIsObjectAndBranch(UseRegisterAtStart(instr->value())); diff --git a/src/x64/lithium-x64.h b/src/x64/lithium-x64.h index 92ddc89..50e32d8 100644 --- a/src/x64/lithium-x64.h +++ b/src/x64/lithium-x64.h @@ -74,7 +74,6 @@ class LCodeGen; V(ClampIToUint8) \ V(ClampTToUint8) \ V(ClassOfTestAndBranch) \ - V(CmpConstantEqAndBranch) \ V(CompareNumericAndBranch) \ V(CmpObjectEqAndBranch) \ V(CmpMapAndBranch) \ @@ -832,20 +831,6 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { - public: - explicit LCmpConstantEqAndBranch(LOperand* left) { - inputs_[0] = left; - } - - LOperand* left() { return inputs_[0]; } - - DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, - "cmp-constant-eq-and-branch") - DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) -}; - - class LIsObjectAndBranch: public LControlInstruction<1, 0> { public: explicit LIsObjectAndBranch(LOperand* value) {