| 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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 // barrier mode. | 1123 // barrier mode. |
| 1124 inline WriteBarrierMode GetWriteBarrierMode(const AssertNoAllocation&); | 1124 inline WriteBarrierMode GetWriteBarrierMode(const AssertNoAllocation&); |
| 1125 | 1125 |
| 1126 // Dispatched behavior. | 1126 // Dispatched behavior. |
| 1127 void HeapObjectShortPrint(StringStream* accumulator); | 1127 void HeapObjectShortPrint(StringStream* accumulator); |
| 1128 #ifdef OBJECT_PRINT | 1128 #ifdef OBJECT_PRINT |
| 1129 inline void HeapObjectPrint() { | 1129 inline void HeapObjectPrint() { |
| 1130 HeapObjectPrint(stdout); | 1130 HeapObjectPrint(stdout); |
| 1131 } | 1131 } |
| 1132 void HeapObjectPrint(FILE* out); | 1132 void HeapObjectPrint(FILE* out); |
| 1133 void PrintHeader(FILE* out, const char* id); |
| 1133 #endif | 1134 #endif |
| 1135 |
| 1134 #ifdef DEBUG | 1136 #ifdef DEBUG |
| 1135 void HeapObjectVerify(); | 1137 void HeapObjectVerify(); |
| 1136 inline void VerifyObjectField(int offset); | 1138 inline void VerifyObjectField(int offset); |
| 1137 inline void VerifySmiField(int offset); | 1139 inline void VerifySmiField(int offset); |
| 1138 #endif | |
| 1139 | 1140 |
| 1140 #ifdef OBJECT_PRINT | |
| 1141 void PrintHeader(FILE* out, const char* id); | |
| 1142 #endif | |
| 1143 | |
| 1144 #ifdef DEBUG | |
| 1145 // Verify a pointer is a valid HeapObject pointer that points to object | 1141 // Verify a pointer is a valid HeapObject pointer that points to object |
| 1146 // areas in the heap. | 1142 // areas in the heap. |
| 1147 static void VerifyHeapPointer(Object* p); | 1143 static void VerifyHeapPointer(Object* p); |
| 1148 #endif | 1144 #endif |
| 1149 | 1145 |
| 1150 // Layout description. | 1146 // Layout description. |
| 1151 // First field in a heap object is map. | 1147 // First field in a heap object is map. |
| 1152 static const int kMapOffset = Object::kHeaderSize; | 1148 static const int kMapOffset = Object::kHeaderSize; |
| 1153 static const int kHeaderSize = kMapOffset + kPointerSize; | 1149 static const int kHeaderSize = kMapOffset + kPointerSize; |
| 1154 | 1150 |
| (...skipping 6093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7248 } else { | 7244 } else { |
| 7249 value &= ~(1 << bit_position); | 7245 value &= ~(1 << bit_position); |
| 7250 } | 7246 } |
| 7251 return value; | 7247 return value; |
| 7252 } | 7248 } |
| 7253 }; | 7249 }; |
| 7254 | 7250 |
| 7255 } } // namespace v8::internal | 7251 } } // namespace v8::internal |
| 7256 | 7252 |
| 7257 #endif // V8_OBJECTS_H_ | 7253 #endif // V8_OBJECTS_H_ |
| OLD | NEW |