Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: src/hydrogen-instructions.h

Issue 7206040: Remove redundant hydrogen- and lithium instruction for symbol comparison. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 8347)
+++ src/hydrogen-instructions.h (working copy)
@@ -91,9 +91,8 @@
V(ClampToUint8) \
V(ClassOfTest) \
V(Compare) \
- V(CompareJSObjectEq) \
+ V(CompareObjectEq) \
V(CompareMap) \
- V(CompareSymbolEq) \
V(CompareConstantEq) \
V(Constant) \
V(Context) \
@@ -2555,9 +2554,9 @@
};
-class HCompareJSObjectEq: public HBinaryOperation {
+class HCompareObjectEq: public HBinaryOperation {
public:
- HCompareJSObjectEq(HValue* left, HValue* right)
+ HCompareObjectEq(HValue* left, HValue* right)
: HBinaryOperation(left, right) {
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
@@ -2573,47 +2572,13 @@
}
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq)
+ DECLARE_CONCRETE_INSTRUCTION(CompareObjectEq)
protected:
virtual bool DataEquals(HValue* other) { return true; }
};
-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 HCompareConstantEq: public HUnaryOperation {
public:
HCompareConstantEq(HValue* left, int right, Token::Value op)
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698