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

Unified Diff: src/hydrogen-instructions.h

Issue 21014004: Add equality type parameter to HCompareObjectAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
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_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | src/hydrogen-instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698