OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1430 // object, and so is safe to call while the map pointer is modified. | 1430 // object, and so is safe to call while the map pointer is modified. |
1431 void IterateBody(InstanceType type, int object_size, ObjectVisitor* v); | 1431 void IterateBody(InstanceType type, int object_size, ObjectVisitor* v); |
1432 | 1432 |
1433 // Returns the heap object's size in bytes | 1433 // Returns the heap object's size in bytes |
1434 inline int Size(); | 1434 inline int Size(); |
1435 | 1435 |
1436 // Returns true if this heap object may contain raw values, i.e., values that | 1436 // Returns true if this heap object may contain raw values, i.e., values that |
1437 // look like pointers to heap objects. | 1437 // look like pointers to heap objects. |
1438 inline bool MayContainRawValues(); | 1438 inline bool MayContainRawValues(); |
1439 | 1439 |
1440 // Returns true if this heap object may contain both raw values and | |
1441 // tagged pointers. | |
1442 inline bool MayContainMixedValues(); | |
Igor Sheludko
2015/05/13 12:22:59
Does it make sense to merge two MayContain..() met
| |
1443 | |
1440 // Given a heap object's map pointer, returns the heap size in bytes | 1444 // Given a heap object's map pointer, returns the heap size in bytes |
1441 // Useful when the map pointer field is used for other purposes. | 1445 // Useful when the map pointer field is used for other purposes. |
1442 // GC internal. | 1446 // GC internal. |
1443 inline int SizeFromMap(Map* map); | 1447 inline int SizeFromMap(Map* map); |
1444 | 1448 |
1445 // Returns the field at offset in obj, as a read/write Object* reference. | 1449 // Returns the field at offset in obj, as a read/write Object* reference. |
1446 // Does no checking, and is safe to use during GC, while maps are invalid. | 1450 // Does no checking, and is safe to use during GC, while maps are invalid. |
1447 // Does not invoke write barrier, so should only be assigned to | 1451 // Does not invoke write barrier, so should only be assigned to |
1448 // during marking GC. | 1452 // during marking GC. |
1449 static inline Object** RawField(HeapObject* obj, int offset); | 1453 static inline Object** RawField(HeapObject* obj, int offset); |
(...skipping 9662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11112 } else { | 11116 } else { |
11113 value &= ~(1 << bit_position); | 11117 value &= ~(1 << bit_position); |
11114 } | 11118 } |
11115 return value; | 11119 return value; |
11116 } | 11120 } |
11117 }; | 11121 }; |
11118 | 11122 |
11119 } } // namespace v8::internal | 11123 } } // namespace v8::internal |
11120 | 11124 |
11121 #endif // V8_OBJECTS_H_ | 11125 #endif // V8_OBJECTS_H_ |
OLD | NEW |