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

Side by Side Diff: src/type-info.h

Issue 1520001: Start using String type info: (Closed)
Patch Set: Review Created 10 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
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/type-info.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 inline bool IsInteger32() { 149 inline bool IsInteger32() {
150 ASSERT(type_ != kUninitializedType); 150 ASSERT(type_ != kUninitializedType);
151 return ((type_ & kInteger32Type) == kInteger32Type); 151 return ((type_ & kInteger32Type) == kInteger32Type);
152 } 152 }
153 153
154 inline bool IsDouble() { 154 inline bool IsDouble() {
155 ASSERT(type_ != kUninitializedType); 155 ASSERT(type_ != kUninitializedType);
156 return ((type_ & kDoubleType) == kDoubleType); 156 return ((type_ & kDoubleType) == kDoubleType);
157 } 157 }
158 158
159 inline bool IsString() {
160 ASSERT(type_ != kUninitializedType);
161 return ((type_ & kStringType) == kStringType);
162 }
163
159 inline bool IsUninitialized() { 164 inline bool IsUninitialized() {
160 return type_ == kUninitializedType; 165 return type_ == kUninitializedType;
161 } 166 }
162 167
163 const char* ToString() { 168 const char* ToString() {
164 switch (type_) { 169 switch (type_) {
165 case kUnknownType: return "UnknownType"; 170 case kUnknownType: return "UnknownType";
166 case kPrimitiveType: return "PrimitiveType"; 171 case kPrimitiveType: return "PrimitiveType";
167 case kNumberType: return "NumberType"; 172 case kNumberType: return "NumberType";
168 case kInteger32Type: return "Integer32Type"; 173 case kInteger32Type: return "Integer32Type";
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 235 }
231 236
232 237
233 TypeInfo TypeInfo::Uninitialized() { 238 TypeInfo TypeInfo::Uninitialized() {
234 return TypeInfo(kUninitializedType); 239 return TypeInfo(kUninitializedType);
235 } 240 }
236 241
237 } } // namespace v8::internal 242 } } // namespace v8::internal
238 243
239 #endif // V8_TYPE_INFO_H_ 244 #endif // V8_TYPE_INFO_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698