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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 return new_space_.allocation_limit_address(); | 590 return new_space_.allocation_limit_address(); |
591 } | 591 } |
592 | 592 |
593 Address* OldPointerSpaceAllocationTopAddress() { | 593 Address* OldPointerSpaceAllocationTopAddress() { |
594 return old_pointer_space_->allocation_top_address(); | 594 return old_pointer_space_->allocation_top_address(); |
595 } | 595 } |
596 Address* OldPointerSpaceAllocationLimitAddress() { | 596 Address* OldPointerSpaceAllocationLimitAddress() { |
597 return old_pointer_space_->allocation_limit_address(); | 597 return old_pointer_space_->allocation_limit_address(); |
598 } | 598 } |
599 | 599 |
| 600 Address* OldDataSpaceAllocationTopAddress() { |
| 601 return old_data_space_->allocation_top_address(); |
| 602 } |
| 603 Address* OldDataSpaceAllocationLimitAddress() { |
| 604 return old_data_space_->allocation_limit_address(); |
| 605 } |
| 606 |
600 // Uncommit unused semi space. | 607 // Uncommit unused semi space. |
601 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } | 608 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } |
602 | 609 |
603 // Allocates and initializes a new JavaScript object based on a | 610 // Allocates and initializes a new JavaScript object based on a |
604 // constructor. | 611 // constructor. |
605 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 612 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
606 // failed. | 613 // failed. |
607 // Please note this does not perform a garbage collection. | 614 // Please note this does not perform a garbage collection. |
608 MUST_USE_RESULT MaybeObject* AllocateJSObject( | 615 MUST_USE_RESULT MaybeObject* AllocateJSObject( |
609 JSFunction* constructor, | 616 JSFunction* constructor, |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 inline bool InNewSpace(Object* object); | 1326 inline bool InNewSpace(Object* object); |
1320 inline bool InNewSpace(Address address); | 1327 inline bool InNewSpace(Address address); |
1321 inline bool InNewSpacePage(Address address); | 1328 inline bool InNewSpacePage(Address address); |
1322 inline bool InFromSpace(Object* object); | 1329 inline bool InFromSpace(Object* object); |
1323 inline bool InToSpace(Object* object); | 1330 inline bool InToSpace(Object* object); |
1324 | 1331 |
1325 // Returns whether the object resides in old pointer space. | 1332 // Returns whether the object resides in old pointer space. |
1326 inline bool InOldPointerSpace(Address address); | 1333 inline bool InOldPointerSpace(Address address); |
1327 inline bool InOldPointerSpace(Object* object); | 1334 inline bool InOldPointerSpace(Object* object); |
1328 | 1335 |
| 1336 // Returns whether the object resides in old data space. |
| 1337 inline bool InOldDataSpace(Address address); |
| 1338 inline bool InOldDataSpace(Object* object); |
| 1339 |
1329 // Checks whether an address/object in the heap (including auxiliary | 1340 // Checks whether an address/object in the heap (including auxiliary |
1330 // area and unused area). | 1341 // area and unused area). |
1331 bool Contains(Address addr); | 1342 bool Contains(Address addr); |
1332 bool Contains(HeapObject* value); | 1343 bool Contains(HeapObject* value); |
1333 | 1344 |
1334 // Checks whether an address/object in a space. | 1345 // Checks whether an address/object in a space. |
1335 // Currently used by tests, serialization and heap verification only. | 1346 // Currently used by tests, serialization and heap verification only. |
1336 bool InSpace(Address addr, AllocationSpace space); | 1347 bool InSpace(Address addr, AllocationSpace space); |
1337 bool InSpace(HeapObject* value, AllocationSpace space); | 1348 bool InSpace(HeapObject* value, AllocationSpace space); |
1338 | 1349 |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 3037 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
3027 | 3038 |
3028 private: | 3039 private: |
3029 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3040 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3030 }; | 3041 }; |
3031 #endif // DEBUG | 3042 #endif // DEBUG |
3032 | 3043 |
3033 } } // namespace v8::internal | 3044 } } // namespace v8::internal |
3034 | 3045 |
3035 #endif // V8_HEAP_H_ | 3046 #endif // V8_HEAP_H_ |
OLD | NEW |