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

Unified Diff: src/token.h

Issue 12217136: Fix NegateCompareOp and InvertCompareOp (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 10 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
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/regress/regress-2537.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/token.h
diff --git a/src/token.h b/src/token.h
index 863ba6285760d4f8a015b9d22dab7962584aecf0..4078a15cdbe6498b5ead56d90575dedde88c384a 100644
--- a/src/token.h
+++ b/src/token.h
@@ -230,26 +230,30 @@ class Token {
case EQ: return NE;
case NE: return EQ;
case EQ_STRICT: return NE_STRICT;
+ case NE_STRICT: return EQ_STRICT;
case LT: return GTE;
case GT: return LTE;
case LTE: return GT;
case GTE: return LT;
default:
+ UNREACHABLE();
return op;
}
}
- static Value InvertCompareOp(Value op) {
+ static Value ReverseCompareOp(Value op) {
ASSERT(IsCompareOp(op));
switch (op) {
- case EQ: return NE;
- case NE: return EQ;
- case EQ_STRICT: return NE_STRICT;
+ case EQ: return EQ;
+ case NE: return NE;
+ case EQ_STRICT: return EQ_STRICT;
+ case NE_STRICT: return NE_STRICT;
case LT: return GT;
case GT: return LT;
case LTE: return GTE;
case GTE: return LTE;
default:
+ UNREACHABLE();
return op;
}
}
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/regress/regress-2537.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698