| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 public: | 898 public: |
| 899 // Returns the integer value. | 899 // Returns the integer value. |
| 900 inline int value(); | 900 inline int value(); |
| 901 | 901 |
| 902 // Convert a value to a Smi object. | 902 // Convert a value to a Smi object. |
| 903 static inline Smi* FromInt(int value); | 903 static inline Smi* FromInt(int value); |
| 904 | 904 |
| 905 static inline Smi* FromIntptr(intptr_t value); | 905 static inline Smi* FromIntptr(intptr_t value); |
| 906 | 906 |
| 907 // Returns whether value can be represented in a Smi. | 907 // Returns whether value can be represented in a Smi. |
| 908 static inline bool IsValid(int value); | 908 static inline bool IsValid(intptr_t value); |
| 909 | 909 |
| 910 static inline bool IsIntptrValid(intptr_t); | 910 static inline bool IsIntptrValid(intptr_t); |
| 911 | 911 |
| 912 // Casting. | 912 // Casting. |
| 913 static inline Smi* cast(Object* object); | 913 static inline Smi* cast(Object* object); |
| 914 | 914 |
| 915 // Dispatched behavior. | 915 // Dispatched behavior. |
| 916 void SmiPrint(); | 916 void SmiPrint(); |
| 917 void SmiPrint(StringStream* accumulator); | 917 void SmiPrint(StringStream* accumulator); |
| 918 #ifdef DEBUG | 918 #ifdef DEBUG |
| (...skipping 3918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4837 } else { | 4837 } else { |
| 4838 value &= ~(1 << bit_position); | 4838 value &= ~(1 << bit_position); |
| 4839 } | 4839 } |
| 4840 return value; | 4840 return value; |
| 4841 } | 4841 } |
| 4842 }; | 4842 }; |
| 4843 | 4843 |
| 4844 } } // namespace v8::internal | 4844 } } // namespace v8::internal |
| 4845 | 4845 |
| 4846 #endif // V8_OBJECTS_H_ | 4846 #endif // V8_OBJECTS_H_ |
| OLD | NEW |