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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 INLINE(bool IsFalse()); | 1050 INLINE(bool IsFalse()); |
1051 inline bool IsArgumentsMarker(); | 1051 inline bool IsArgumentsMarker(); |
1052 inline bool NonFailureIsHeapObject(); | 1052 inline bool NonFailureIsHeapObject(); |
1053 | 1053 |
1054 // Filler objects (fillers and free space objects). | 1054 // Filler objects (fillers and free space objects). |
1055 inline bool IsFiller(); | 1055 inline bool IsFiller(); |
1056 | 1056 |
1057 // Extract the number. | 1057 // Extract the number. |
1058 inline double Number(); | 1058 inline double Number(); |
1059 inline bool IsNaN(); | 1059 inline bool IsNaN(); |
| 1060 bool ToInt32(int32_t* value); |
| 1061 bool ToUint32(uint32_t* value); |
1060 | 1062 |
1061 inline Representation OptimalRepresentation() { | 1063 inline Representation OptimalRepresentation() { |
1062 if (FLAG_track_fields && IsSmi()) { | 1064 if (FLAG_track_fields && IsSmi()) { |
1063 return Representation::Smi(); | 1065 return Representation::Smi(); |
1064 } else if (FLAG_track_double_fields && IsHeapNumber()) { | 1066 } else if (FLAG_track_double_fields && IsHeapNumber()) { |
1065 return Representation::Double(); | 1067 return Representation::Double(); |
1066 } else if (FLAG_track_heap_object_fields && !IsUndefined()) { | 1068 } else if (FLAG_track_heap_object_fields && !IsUndefined()) { |
1067 // Don't track undefined as heapobject because it's also used as temporary | 1069 // Don't track undefined as heapobject because it's also used as temporary |
1068 // value for computed fields that may turn out to be Smi. That combination | 1070 // value for computed fields that may turn out to be Smi. That combination |
1069 // will go tagged, so go tagged immediately. | 1071 // will go tagged, so go tagged immediately. |
(...skipping 8561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9631 } else { | 9633 } else { |
9632 value &= ~(1 << bit_position); | 9634 value &= ~(1 << bit_position); |
9633 } | 9635 } |
9634 return value; | 9636 return value; |
9635 } | 9637 } |
9636 }; | 9638 }; |
9637 | 9639 |
9638 } } // namespace v8::internal | 9640 } } // namespace v8::internal |
9639 | 9641 |
9640 #endif // V8_OBJECTS_H_ | 9642 #endif // V8_OBJECTS_H_ |
OLD | NEW |