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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 // Dispatched behavior. | 979 // Dispatched behavior. |
980 inline void SmiPrint() { | 980 inline void SmiPrint() { |
981 SmiPrint(stdout); | 981 SmiPrint(stdout); |
982 } | 982 } |
983 void SmiPrint(FILE* out); | 983 void SmiPrint(FILE* out); |
984 void SmiPrint(StringStream* accumulator); | 984 void SmiPrint(StringStream* accumulator); |
985 #ifdef DEBUG | 985 #ifdef DEBUG |
986 void SmiVerify(); | 986 void SmiVerify(); |
987 #endif | 987 #endif |
988 | 988 |
989 static const int kMinValue = (-1U << (kSmiValueSize - 1)); | 989 static const int kMinValue = |
| 990 (static_cast<unsigned int>(-1)) << (kSmiValueSize - 1); |
990 static const int kMaxValue = -(kMinValue + 1); | 991 static const int kMaxValue = -(kMinValue + 1); |
991 | 992 |
992 private: | 993 private: |
993 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); | 994 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); |
994 }; | 995 }; |
995 | 996 |
996 | 997 |
997 // Failure is used for reporting out of memory situations and | 998 // Failure is used for reporting out of memory situations and |
998 // propagating exceptions through the runtime system. Failure objects | 999 // propagating exceptions through the runtime system. Failure objects |
999 // are transient and cannot occur as part of the object graph. | 1000 // are transient and cannot occur as part of the object graph. |
(...skipping 6567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7567 } else { | 7568 } else { |
7568 value &= ~(1 << bit_position); | 7569 value &= ~(1 << bit_position); |
7569 } | 7570 } |
7570 return value; | 7571 return value; |
7571 } | 7572 } |
7572 }; | 7573 }; |
7573 | 7574 |
7574 } } // namespace v8::internal | 7575 } } // namespace v8::internal |
7575 | 7576 |
7576 #endif // V8_OBJECTS_H_ | 7577 #endif // V8_OBJECTS_H_ |
OLD | NEW |