| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 bool CanBeZero() const { return upper_ >= 0 && lower_ <= 0; } | 238 bool CanBeZero() const { return upper_ >= 0 && lower_ <= 0; } |
| 239 bool CanBeNegative() const { return lower_ < 0; } | 239 bool CanBeNegative() const { return lower_ < 0; } |
| 240 bool Includes(int value) const { return lower_ <= value && upper_ >= value; } | 240 bool Includes(int value) const { return lower_ <= value && upper_ >= value; } |
| 241 bool IsMostGeneric() const { | 241 bool IsMostGeneric() const { |
| 242 return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero(); | 242 return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero(); |
| 243 } | 243 } |
| 244 bool IsInSmiRange() const { | 244 bool IsInSmiRange() const { |
| 245 return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue; | 245 return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue; |
| 246 } | 246 } |
| 247 void KeepOrder(); | 247 void KeepOrder(); |
| 248 #ifdef DEBUG |
| 248 void Verify() const; | 249 void Verify() const; |
| 250 #endif |
| 249 | 251 |
| 250 void StackUpon(Range* other) { | 252 void StackUpon(Range* other) { |
| 251 Intersect(other); | 253 Intersect(other); |
| 252 next_ = other; | 254 next_ = other; |
| 253 } | 255 } |
| 254 | 256 |
| 255 void Intersect(Range* other); | 257 void Intersect(Range* other); |
| 256 void Union(Range* other); | 258 void Union(Range* other); |
| 257 | 259 |
| 258 void AddConstant(int32_t value); | 260 void AddConstant(int32_t value); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } | 400 } |
| 399 | 401 |
| 400 bool IsHeapObject() { | 402 bool IsHeapObject() { |
| 401 ASSERT(type_ != kUninitialized); | 403 ASSERT(type_ != kUninitialized); |
| 402 return IsHeapNumber() || IsString() || IsNonPrimitive(); | 404 return IsHeapNumber() || IsString() || IsNonPrimitive(); |
| 403 } | 405 } |
| 404 | 406 |
| 405 static HType TypeFromValue(Handle<Object> value); | 407 static HType TypeFromValue(Handle<Object> value); |
| 406 | 408 |
| 407 const char* ToString(); | 409 const char* ToString(); |
| 408 const char* ToShortString(); | |
| 409 | 410 |
| 410 private: | 411 private: |
| 411 enum Type { | 412 enum Type { |
| 412 kTagged = 0x1, // 0000 0000 0000 0001 | 413 kTagged = 0x1, // 0000 0000 0000 0001 |
| 413 kTaggedPrimitive = 0x5, // 0000 0000 0000 0101 | 414 kTaggedPrimitive = 0x5, // 0000 0000 0000 0101 |
| 414 kTaggedNumber = 0xd, // 0000 0000 0000 1101 | 415 kTaggedNumber = 0xd, // 0000 0000 0000 1101 |
| 415 kSmi = 0x1d, // 0000 0000 0001 1101 | 416 kSmi = 0x1d, // 0000 0000 0001 1101 |
| 416 kHeapNumber = 0x2d, // 0000 0000 0010 1101 | 417 kHeapNumber = 0x2d, // 0000 0000 0010 1101 |
| 417 kString = 0x45, // 0000 0000 0100 0101 | 418 kString = 0x45, // 0000 0000 0100 0101 |
| 418 kBoolean = 0x85, // 0000 0000 1000 0101 | 419 kBoolean = 0x85, // 0000 0000 1000 0101 |
| (...skipping 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4284 | 4285 |
| 4285 DECLARE_CONCRETE_INSTRUCTION(In) | 4286 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4286 }; | 4287 }; |
| 4287 | 4288 |
| 4288 #undef DECLARE_INSTRUCTION | 4289 #undef DECLARE_INSTRUCTION |
| 4289 #undef DECLARE_CONCRETE_INSTRUCTION | 4290 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4290 | 4291 |
| 4291 } } // namespace v8::internal | 4292 } } // namespace v8::internal |
| 4292 | 4293 |
| 4293 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4294 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |