Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index 85a06fcbb7b56a87a9fec6b574ea21e98273a8f2..025a2fa77c94966e3f36a2322e94e07e589501ad 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -91,6 +91,7 @@ class LChunkBuilder; |
| V(Compare) \ |
| V(CompareJSObjectEq) \ |
| V(CompareMap) \ |
| + V(CompareSymbolEq) \ |
| V(Constant) \ |
| V(Context) \ |
| V(DeleteProperty) \ |
| @@ -2409,6 +2410,38 @@ class HCompareJSObjectEq: public HBinaryOperation { |
| }; |
| +class HCompareSymbolEq: public HBinaryOperation { |
| + public: |
| + HCompareSymbolEq(HValue* left, HValue* right, Token::Value op) |
| + : HBinaryOperation(left, right), op_(op) { |
| + ASSERT(op == Token::EQ || op == Token::EQ_STRICT); |
| + set_representation(Representation::Tagged()); |
| + SetFlag(kUseGVN); |
| + SetFlag(kDependsOnMaps); |
| + } |
| + |
| + Token::Value op() const { return op_; } |
| + |
| + virtual bool EmitAtUses() { |
| + return !HasSideEffects() && !HasMultipleUses(); |
| + } |
| + |
| + virtual Representation RequiredInputRepresentation(int index) const { |
| + return Representation::Tagged(); |
| + } |
| + |
| + virtual HType CalculateInferredType() { return HType::Boolean(); } |
| + |
| + DECLARE_CONCRETE_INSTRUCTION(CompareSymbolEq); |
| + |
| + protected: |
| + virtual bool DataEquals(HValue* other) { return true; } |
|
Mads Ager (chromium)
2011/05/11 12:37:31
Don't you have to check that the ops are the same
Vitaly Repeshko
2011/05/11 12:44:46
Good catch! Fixed.
|
| + |
| + private: |
| + const Token::Value op_; |
| +}; |
| + |
| + |
| class HUnaryPredicate: public HUnaryOperation { |
| public: |
| explicit HUnaryPredicate(HValue* value) : HUnaryOperation(value) { |