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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

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/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 4ce7fd6067d106d92209b07a5f17d272bd15b292..13da17a3db343651f438fc0d9afe47ebcfa67c44 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -2360,6 +2360,9 @@ Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) {
case Token::EQ_STRICT:
cond = equal;
break;
+ case Token::NE:
+ cond = not_equal;
+ break;
case Token::LT:
cond = is_unsigned ? below : less;
break;
@@ -2418,7 +2421,7 @@ void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
}
-void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) {
+void LCodeGen::DoCmpObjectAndBranch(LCmpObjectAndBranch* instr) {
Register left = ToRegister(instr->left());
if (instr->right()->IsConstantOperand()) {
@@ -2428,7 +2431,7 @@ void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) {
Operand right = ToOperand(instr->right());
__ cmp(left, right);
}
- EmitBranch(instr, equal);
+ EmitBranch(instr, instr->hydrogen()->is_equal() ? equal : not_equal);
}

Powered by Google App Engine
This is Rietveld 408576698