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

Side by Side Diff: src/token.h

Issue 9584006: Inline ordered relative compares of mixed double/undefined values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tweak comment Created 8 years, 9 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/ic.cc ('k') | src/x64/code-stubs-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 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 209
210 static bool IsBinaryOp(Value op) { 210 static bool IsBinaryOp(Value op) {
211 return COMMA <= op && op <= MOD; 211 return COMMA <= op && op <= MOD;
212 } 212 }
213 213
214 static bool IsCompareOp(Value op) { 214 static bool IsCompareOp(Value op) {
215 return EQ <= op && op <= IN; 215 return EQ <= op && op <= IN;
216 } 216 }
217 217
218 static bool IsOrderedCompareOp(Value op) { 218 static bool IsOrderedRelationalCompareOp(Value op) {
219 return op == LT || op == LTE || op == GT || op == GTE; 219 return op == LT || op == LTE || op == GT || op == GTE;
220 } 220 }
221 221
222 static bool IsEqualityOp(Value op) { 222 static bool IsEqualityOp(Value op) {
223 return op == EQ || op == EQ_STRICT; 223 return op == EQ || op == EQ_STRICT;
224 } 224 }
225 225
226 static Value NegateCompareOp(Value op) { 226 static Value NegateCompareOp(Value op) {
227 ASSERT(IsCompareOp(op)); 227 ASSERT(IsCompareOp(op));
228 switch (op) { 228 switch (op) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 private: 287 private:
288 static const char* const name_[NUM_TOKENS]; 288 static const char* const name_[NUM_TOKENS];
289 static const char* const string_[NUM_TOKENS]; 289 static const char* const string_[NUM_TOKENS];
290 static const int8_t precedence_[NUM_TOKENS]; 290 static const int8_t precedence_[NUM_TOKENS];
291 static const char token_type[NUM_TOKENS]; 291 static const char token_type[NUM_TOKENS];
292 }; 292 };
293 293
294 } } // namespace v8::internal 294 } } // namespace v8::internal
295 295
296 #endif // V8_TOKEN_H_ 296 #endif // V8_TOKEN_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698