OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 // Dispatched behavior. | 1004 // Dispatched behavior. |
1005 inline void SmiPrint() { | 1005 inline void SmiPrint() { |
1006 SmiPrint(stdout); | 1006 SmiPrint(stdout); |
1007 } | 1007 } |
1008 void SmiPrint(FILE* out); | 1008 void SmiPrint(FILE* out); |
1009 void SmiPrint(StringStream* accumulator); | 1009 void SmiPrint(StringStream* accumulator); |
1010 #ifdef DEBUG | 1010 #ifdef DEBUG |
1011 void SmiVerify(); | 1011 void SmiVerify(); |
1012 #endif | 1012 #endif |
1013 | 1013 |
1014 static const int kMinValue = (-1 << (kSmiValueSize - 1)); | 1014 static const int kMinValue = (-1U << (kSmiValueSize - 1)); |
1015 static const int kMaxValue = -(kMinValue + 1); | 1015 static const int kMaxValue = -(kMinValue + 1); |
1016 | 1016 |
1017 private: | 1017 private: |
1018 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); | 1018 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); |
1019 }; | 1019 }; |
1020 | 1020 |
1021 | 1021 |
1022 // Failure is used for reporting out of memory situations and | 1022 // Failure is used for reporting out of memory situations and |
1023 // propagating exceptions through the runtime system. Failure objects | 1023 // propagating exceptions through the runtime system. Failure objects |
1024 // are transient and cannot occur as part of the object graph. | 1024 // are transient and cannot occur as part of the object graph. |
(...skipping 7274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8299 } else { | 8299 } else { |
8300 value &= ~(1 << bit_position); | 8300 value &= ~(1 << bit_position); |
8301 } | 8301 } |
8302 return value; | 8302 return value; |
8303 } | 8303 } |
8304 }; | 8304 }; |
8305 | 8305 |
8306 } } // namespace v8::internal | 8306 } } // namespace v8::internal |
8307 | 8307 |
8308 #endif // V8_OBJECTS_H_ | 8308 #endif // V8_OBJECTS_H_ |
OLD | NEW |