| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1015 |
| 1016 // Iterates over pointers contained in the object (including the Map) | 1016 // Iterates over pointers contained in the object (including the Map) |
| 1017 void Iterate(ObjectVisitor* v); | 1017 void Iterate(ObjectVisitor* v); |
| 1018 | 1018 |
| 1019 // Iterates over all pointers contained in the object except the | 1019 // Iterates over all pointers contained in the object except the |
| 1020 // first map pointer. The object type is given in the first | 1020 // first map pointer. The object type is given in the first |
| 1021 // parameter. This function does not access the map pointer in the | 1021 // parameter. This function does not access the map pointer in the |
| 1022 // object, and so is safe to call while the map pointer is modified. | 1022 // object, and so is safe to call while the map pointer is modified. |
| 1023 void IterateBody(InstanceType type, int object_size, ObjectVisitor* v); | 1023 void IterateBody(InstanceType type, int object_size, ObjectVisitor* v); |
| 1024 | 1024 |
| 1025 // This method only applies to struct objects. Iterates over all the fields | |
| 1026 // of this struct. | |
| 1027 void IterateStructBody(int object_size, ObjectVisitor* v); | |
| 1028 | |
| 1029 // Returns the heap object's size in bytes | 1025 // Returns the heap object's size in bytes |
| 1030 inline int Size(); | 1026 inline int Size(); |
| 1031 | 1027 |
| 1032 // Given a heap object's map pointer, returns the heap size in bytes | 1028 // Given a heap object's map pointer, returns the heap size in bytes |
| 1033 // Useful when the map pointer field is used for other purposes. | 1029 // Useful when the map pointer field is used for other purposes. |
| 1034 // GC internal. | 1030 // GC internal. |
| 1035 inline int SizeFromMap(Map* map); | 1031 inline int SizeFromMap(Map* map); |
| 1036 | 1032 |
| 1037 // Support for the marking heap objects during the marking phase of GC. | 1033 // Support for the marking heap objects during the marking phase of GC. |
| 1038 // True if the object is marked live. | 1034 // True if the object is marked live. |
| (...skipping 4465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5504 } else { | 5500 } else { |
| 5505 value &= ~(1 << bit_position); | 5501 value &= ~(1 << bit_position); |
| 5506 } | 5502 } |
| 5507 return value; | 5503 return value; |
| 5508 } | 5504 } |
| 5509 }; | 5505 }; |
| 5510 | 5506 |
| 5511 } } // namespace v8::internal | 5507 } } // namespace v8::internal |
| 5512 | 5508 |
| 5513 #endif // V8_OBJECTS_H_ | 5509 #endif // V8_OBJECTS_H_ |
| OLD | NEW |