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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 | 1384 |
1385 // Checks whether an address/object in a space. | 1385 // Checks whether an address/object in a space. |
1386 // Currently used by tests, serialization and heap verification only. | 1386 // Currently used by tests, serialization and heap verification only. |
1387 bool InSpace(Address addr, AllocationSpace space); | 1387 bool InSpace(Address addr, AllocationSpace space); |
1388 bool InSpace(HeapObject* value, AllocationSpace space); | 1388 bool InSpace(HeapObject* value, AllocationSpace space); |
1389 | 1389 |
1390 // Finds out which space an object should get promoted to based on its type. | 1390 // Finds out which space an object should get promoted to based on its type. |
1391 inline OldSpace* TargetSpace(HeapObject* object); | 1391 inline OldSpace* TargetSpace(HeapObject* object); |
1392 static inline AllocationSpace TargetSpaceId(InstanceType type); | 1392 static inline AllocationSpace TargetSpaceId(InstanceType type); |
1393 | 1393 |
| 1394 // Checks whether the given object is allowed to be migrated from it's |
| 1395 // current space into the given destination space. Used for debugging. |
| 1396 inline bool AllowedToBeMigrated(HeapObject* object, AllocationSpace dest); |
| 1397 |
1394 // Sets the stub_cache_ (only used when expanding the dictionary). | 1398 // Sets the stub_cache_ (only used when expanding the dictionary). |
1395 void public_set_code_stubs(UnseededNumberDictionary* value) { | 1399 void public_set_code_stubs(UnseededNumberDictionary* value) { |
1396 roots_[kCodeStubsRootIndex] = value; | 1400 roots_[kCodeStubsRootIndex] = value; |
1397 } | 1401 } |
1398 | 1402 |
1399 // Support for computing object sizes for old objects during GCs. Returns | 1403 // Support for computing object sizes for old objects during GCs. Returns |
1400 // a function that is guaranteed to be safe for computing object sizes in | 1404 // a function that is guaranteed to be safe for computing object sizes in |
1401 // the current GC phase. | 1405 // the current GC phase. |
1402 HeapObjectCallback GcSafeSizeOfOldObjectFunction() { | 1406 HeapObjectCallback GcSafeSizeOfOldObjectFunction() { |
1403 return gc_safe_size_of_old_object_; | 1407 return gc_safe_size_of_old_object_; |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3044 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3048 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3045 | 3049 |
3046 private: | 3050 private: |
3047 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3051 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3048 }; | 3052 }; |
3049 #endif // DEBUG | 3053 #endif // DEBUG |
3050 | 3054 |
3051 } } // namespace v8::internal | 3055 } } // namespace v8::internal |
3052 | 3056 |
3053 #endif // V8_HEAP_H_ | 3057 #endif // V8_HEAP_H_ |
OLD | NEW |