Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index dc312e08958c6406698cc2493b6469eee2f326ff..6873fc268f8cd4fb1fce12af0570b513f41e8f99 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -45,6 +45,7 @@ namespace internal { |
| // Forward declarations. |
| class HBasicBlock; |
| +class HContext; |
| class HEnvironment; |
| class HInferRepresentationPhase; |
| class HInstruction; |
| @@ -99,7 +100,7 @@ class LChunkBuilder; |
| V(ClassOfTestAndBranch) \ |
| V(CompareNumericAndBranch) \ |
| V(CompareGeneric) \ |
| - V(CompareObjectEqAndBranch) \ |
| + V(CompareObjectAndBranch) \ |
| V(CompareMap) \ |
| V(Constant) \ |
| V(Context) \ |
| @@ -4167,11 +4168,15 @@ class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> { |
| }; |
| -class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { |
| +class HCompareObjectAndBranch: public HTemplateControlInstruction<2, 2> { |
| public: |
| - HCompareObjectEqAndBranch(HValue* left, HValue* right) { |
| + HCompareObjectAndBranch(HValue* left, |
| + HValue* right, |
| + Token::Value token = Token::EQ) { |
|
titzer
2013/07/29 13:24:41
I looked, but I couldn't find any uses with the to
danno
2013/07/29 14:44:59
It's used in a follow-on CL that I'm preparing, bu
|
| SetOperandAt(0, left); |
| SetOperandAt(1, right); |
| + ASSERT(token == Token::EQ || token == Token::NE); |
| + compare_token_ = token; |
| } |
| HValue* left() { return OperandAt(0); } |
| @@ -4187,7 +4192,12 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) |
| + bool is_equal() const { return compare_token_ == Token::EQ; } |
| + |
| + DECLARE_CONCRETE_INSTRUCTION(CompareObjectAndBranch) |
| + |
| + private: |
| + Token::Value compare_token_; |
| }; |