| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 return reinterpret_cast<Address>(&always_allocate_scope_depth_); | 273 return reinterpret_cast<Address>(&always_allocate_scope_depth_); |
| 274 } | 274 } |
| 275 | 275 |
| 276 static Address* NewSpaceAllocationTopAddress() { | 276 static Address* NewSpaceAllocationTopAddress() { |
| 277 return new_space_.allocation_top_address(); | 277 return new_space_.allocation_top_address(); |
| 278 } | 278 } |
| 279 static Address* NewSpaceAllocationLimitAddress() { | 279 static Address* NewSpaceAllocationLimitAddress() { |
| 280 return new_space_.allocation_limit_address(); | 280 return new_space_.allocation_limit_address(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 // Uncommit unused semi space. |
| 284 static bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } |
| 285 |
| 283 #ifdef ENABLE_HEAP_PROTECTION | 286 #ifdef ENABLE_HEAP_PROTECTION |
| 284 // Protect/unprotect the heap by marking all spaces read-only/writable. | 287 // Protect/unprotect the heap by marking all spaces read-only/writable. |
| 285 static void Protect(); | 288 static void Protect(); |
| 286 static void Unprotect(); | 289 static void Unprotect(); |
| 287 #endif | 290 #endif |
| 288 | 291 |
| 289 // Allocates and initializes a new JavaScript object based on a | 292 // Allocates and initializes a new JavaScript object based on a |
| 290 // constructor. | 293 // constructor. |
| 291 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 294 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 292 // failed. | 295 // failed. |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 static inline void ScavengeObject(HeapObject** p, HeapObject* object); | 790 static inline void ScavengeObject(HeapObject** p, HeapObject* object); |
| 788 | 791 |
| 789 // Clear a range of remembered set addresses corresponding to the object | 792 // Clear a range of remembered set addresses corresponding to the object |
| 790 // area address 'start' with size 'size_in_bytes', eg, when adding blocks | 793 // area address 'start' with size 'size_in_bytes', eg, when adding blocks |
| 791 // to the free list. | 794 // to the free list. |
| 792 static void ClearRSetRange(Address start, int size_in_bytes); | 795 static void ClearRSetRange(Address start, int size_in_bytes); |
| 793 | 796 |
| 794 // Rebuild remembered set in old and map spaces. | 797 // Rebuild remembered set in old and map spaces. |
| 795 static void RebuildRSets(); | 798 static void RebuildRSets(); |
| 796 | 799 |
| 800 // Commits from space if it is uncommitted. |
| 801 static void EnsureFromSpaceIsCommitted(); |
| 802 |
| 797 // | 803 // |
| 798 // Support for the API. | 804 // Support for the API. |
| 799 // | 805 // |
| 800 | 806 |
| 801 static bool CreateApiObjects(); | 807 static bool CreateApiObjects(); |
| 802 | 808 |
| 803 // Attempt to find the number in a small cache. If we finds it, return | 809 // Attempt to find the number in a small cache. If we finds it, return |
| 804 // the string representation of the number. Otherwise return undefined. | 810 // the string representation of the number. Otherwise return undefined. |
| 805 static Object* GetNumberStringCache(Object* number); | 811 static Object* GetNumberStringCache(Object* number); |
| 806 | 812 |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 int marked_count_; | 1467 int marked_count_; |
| 1462 | 1468 |
| 1463 // The count from the end of the previous full GC. Will be zero if there | 1469 // The count from the end of the previous full GC. Will be zero if there |
| 1464 // was no previous full GC. | 1470 // was no previous full GC. |
| 1465 int previous_marked_count_; | 1471 int previous_marked_count_; |
| 1466 }; | 1472 }; |
| 1467 | 1473 |
| 1468 } } // namespace v8::internal | 1474 } } // namespace v8::internal |
| 1469 | 1475 |
| 1470 #endif // V8_HEAP_H_ | 1476 #endif // V8_HEAP_H_ |
| OLD | NEW |