| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 85a06fcbb7b56a87a9fec6b574ea21e98273a8f2..667dc30bae5316ceabe6af8cdb77265f550ae32f 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,40 @@ 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 op_ == HCompareSymbolEq::cast(other)->op_;
|
| + }
|
| +
|
| + private:
|
| + const Token::Value op_;
|
| +};
|
| +
|
| +
|
| class HUnaryPredicate: public HUnaryOperation {
|
| public:
|
| explicit HUnaryPredicate(HValue* value) : HUnaryOperation(value) {
|
|
|