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

Side by Side Diff: src/token.h

Issue 14211009: Crankshaft: Recognize (i >>> 0) === i for integer32 inputs and replace (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 static bool IsOrderedRelationalCompareOp(Value op) { 220 static bool IsOrderedRelationalCompareOp(Value op) {
221 return op == LT || op == LTE || op == GT || op == GTE; 221 return op == LT || op == LTE || op == GT || op == GTE;
222 } 222 }
223 223
224 static bool IsEqualityOp(Value op) { 224 static bool IsEqualityOp(Value op) {
225 return op == EQ || op == EQ_STRICT; 225 return op == EQ || op == EQ_STRICT;
226 } 226 }
227 227
228 static bool IsStrictOp(Value op) {
229 return op == EQ_STRICT || op == NE_STRICT;
230 }
231
228 static Value NegateCompareOp(Value op) { 232 static Value NegateCompareOp(Value op) {
229 ASSERT(IsCompareOp(op)); 233 ASSERT(IsCompareOp(op));
230 switch (op) { 234 switch (op) {
231 case EQ: return NE; 235 case EQ: return NE;
232 case NE: return EQ; 236 case NE: return EQ;
233 case EQ_STRICT: return NE_STRICT; 237 case EQ_STRICT: return NE_STRICT;
234 case NE_STRICT: return EQ_STRICT; 238 case NE_STRICT: return EQ_STRICT;
235 case LT: return GTE; 239 case LT: return GTE;
236 case GT: return LTE; 240 case GT: return LTE;
237 case LTE: return GT; 241 case LTE: return GT;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 private: 297 private:
294 static const char* const name_[NUM_TOKENS]; 298 static const char* const name_[NUM_TOKENS];
295 static const char* const string_[NUM_TOKENS]; 299 static const char* const string_[NUM_TOKENS];
296 static const int8_t precedence_[NUM_TOKENS]; 300 static const int8_t precedence_[NUM_TOKENS];
297 static const char token_type[NUM_TOKENS]; 301 static const char token_type[NUM_TOKENS];
298 }; 302 };
299 303
300 } } // namespace v8::internal 304 } } // namespace v8::internal
301 305
302 #endif // V8_TOKEN_H_ 306 #endif // V8_TOKEN_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698