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

Unified Diff: src/token.h

Issue 12217136: Fix NegateCompareOp and InvertCompareOp (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | 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..f46f496e566b13ebddc4e55daf424beeb4ba7401 100644
--- a/src/token.h
+++ b/src/token.h
@@ -230,6 +230,7 @@ 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;
@@ -242,9 +243,10 @@ class Token {
static Value InvertCompareOp(Value op) {
Sven Panne 2013/02/13 11:59:30 DBC: Can we rename this to "FlipCompareOp" or some
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;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2537.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698