| 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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 // Dispatched behavior. | 989 // Dispatched behavior. |
| 990 inline void SmiPrint() { | 990 inline void SmiPrint() { |
| 991 SmiPrint(stdout); | 991 SmiPrint(stdout); |
| 992 } | 992 } |
| 993 void SmiPrint(FILE* out); | 993 void SmiPrint(FILE* out); |
| 994 void SmiPrint(StringStream* accumulator); | 994 void SmiPrint(StringStream* accumulator); |
| 995 #ifdef DEBUG | 995 #ifdef DEBUG |
| 996 void SmiVerify(); | 996 void SmiVerify(); |
| 997 #endif | 997 #endif |
| 998 | 998 |
| 999 static const int kMinValue = (-1 << (kSmiValueSize - 1)); | 999 static const int kMinValue = |
| 1000 (static_cast<unsigned int>(-1)) << (kSmiValueSize - 1); |
| 1000 static const int kMaxValue = -(kMinValue + 1); | 1001 static const int kMaxValue = -(kMinValue + 1); |
| 1001 | 1002 |
| 1002 private: | 1003 private: |
| 1003 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); | 1004 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); |
| 1004 }; | 1005 }; |
| 1005 | 1006 |
| 1006 | 1007 |
| 1007 // Failure is used for reporting out of memory situations and | 1008 // Failure is used for reporting out of memory situations and |
| 1008 // propagating exceptions through the runtime system. Failure objects | 1009 // propagating exceptions through the runtime system. Failure objects |
| 1009 // are transient and cannot occur as part of the object graph. | 1010 // are transient and cannot occur as part of the object graph. |
| (...skipping 6943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7953 } else { | 7954 } else { |
| 7954 value &= ~(1 << bit_position); | 7955 value &= ~(1 << bit_position); |
| 7955 } | 7956 } |
| 7956 return value; | 7957 return value; |
| 7957 } | 7958 } |
| 7958 }; | 7959 }; |
| 7959 | 7960 |
| 7960 } } // namespace v8::internal | 7961 } } // namespace v8::internal |
| 7961 | 7962 |
| 7962 #endif // V8_OBJECTS_H_ | 7963 #endif // V8_OBJECTS_H_ |
| OLD | NEW |