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

Unified Diff: src/number-info.h

Issue 593110: Pass the complete number type information into the GenericBinaryOpStub.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/ia32/codegen-ia32.cc ('k') | src/x64/codegen-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/number-info.h
===================================================================
--- src/number-info.h (revision 3862)
+++ src/number-info.h (working copy)
@@ -46,6 +46,26 @@
// Make use of the order of enum values.
return static_cast<Type>(a & b);
}
+
+ static bool IsNumber(Type a) {
+ ASSERT(a != kUninitialized);
+ return ((a & kNumber) != 0);
+ }
+
+ static const char* ToString(Type a) {
+ switch (a) {
+ case kUnknown: return "UnknownType";
+ case kNumber: return "NumberType";
+ case kSmi: return "SmiType";
+ case kHeapNumber: return "HeapNumberType";
+ case kUninitialized:
+ UNREACHABLE();
+ return "UninitializedType";
+ }
+ UNREACHABLE();
+ return "Unreachable code";
+ }
+
};
} } // namespace v8::internal
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/x64/codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698