| 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 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2503 | 2503 | 
| 2504   VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; | 2504   VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; | 
| 2505 | 2505 | 
| 2506   MemoryChunk* chunks_queued_for_free_; | 2506   MemoryChunk* chunks_queued_for_free_; | 
| 2507 | 2507 | 
| 2508   Mutex* relocation_mutex_; | 2508   Mutex* relocation_mutex_; | 
| 2509 #ifdef DEBUG | 2509 #ifdef DEBUG | 
| 2510   bool relocation_mutex_locked_by_optimizer_thread_; | 2510   bool relocation_mutex_locked_by_optimizer_thread_; | 
| 2511 #endif  // DEBUG; | 2511 #endif  // DEBUG; | 
| 2512 | 2512 | 
|  | 2513   int gc_callbacks_depth_; | 
|  | 2514 | 
| 2513   friend class Factory; | 2515   friend class Factory; | 
| 2514   friend class GCTracer; | 2516   friend class GCTracer; | 
| 2515   friend class DisallowAllocationFailure; | 2517   friend class DisallowAllocationFailure; | 
| 2516   friend class AlwaysAllocateScope; | 2518   friend class AlwaysAllocateScope; | 
| 2517   friend class Page; | 2519   friend class Page; | 
| 2518   friend class Isolate; | 2520   friend class Isolate; | 
| 2519   friend class MarkCompactCollector; | 2521   friend class MarkCompactCollector; | 
| 2520   friend class MarkCompactMarkingVisitor; | 2522   friend class MarkCompactMarkingVisitor; | 
| 2521   friend class MapCompact; | 2523   friend class MapCompact; | 
| 2522 #ifdef VERIFY_HEAP | 2524 #ifdef VERIFY_HEAP | 
| 2523   friend class NoWeakObjectVerificationScope; | 2525   friend class NoWeakObjectVerificationScope; | 
| 2524 #endif | 2526 #endif | 
|  | 2527   friend class GCCallbacksScope; | 
| 2525 | 2528 | 
| 2526   DISALLOW_COPY_AND_ASSIGN(Heap); | 2529   DISALLOW_COPY_AND_ASSIGN(Heap); | 
| 2527 }; | 2530 }; | 
| 2528 | 2531 | 
| 2529 | 2532 | 
| 2530 class HeapStats { | 2533 class HeapStats { | 
| 2531  public: | 2534  public: | 
| 2532   static const int kStartMarker = 0xDECADE00; | 2535   static const int kStartMarker = 0xDECADE00; | 
| 2533   static const int kEndMarker = 0xDECADE01; | 2536   static const int kEndMarker = 0xDECADE01; | 
| 2534 | 2537 | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2587 | 2590 | 
| 2588 #ifdef VERIFY_HEAP | 2591 #ifdef VERIFY_HEAP | 
| 2589 class NoWeakObjectVerificationScope { | 2592 class NoWeakObjectVerificationScope { | 
| 2590  public: | 2593  public: | 
| 2591   inline NoWeakObjectVerificationScope(); | 2594   inline NoWeakObjectVerificationScope(); | 
| 2592   inline ~NoWeakObjectVerificationScope(); | 2595   inline ~NoWeakObjectVerificationScope(); | 
| 2593 }; | 2596 }; | 
| 2594 #endif | 2597 #endif | 
| 2595 | 2598 | 
| 2596 | 2599 | 
|  | 2600 class GCCallbacksScope { | 
|  | 2601  public: | 
|  | 2602   explicit inline GCCallbacksScope(Heap* heap); | 
|  | 2603   inline ~GCCallbacksScope(); | 
|  | 2604 | 
|  | 2605   inline bool CheckReenter(); | 
|  | 2606 | 
|  | 2607  private: | 
|  | 2608   Heap* heap_; | 
|  | 2609 }; | 
|  | 2610 | 
|  | 2611 | 
| 2597 // Visitor class to verify interior pointers in spaces that do not contain | 2612 // Visitor class to verify interior pointers in spaces that do not contain | 
| 2598 // or care about intergenerational references. All heap object pointers have to | 2613 // or care about intergenerational references. All heap object pointers have to | 
| 2599 // point into the heap to a location that has a map pointer at its first word. | 2614 // point into the heap to a location that has a map pointer at its first word. | 
| 2600 // Caveat: Heap::Contains is an approximation because it can return true for | 2615 // Caveat: Heap::Contains is an approximation because it can return true for | 
| 2601 // objects in a heap space but above the allocation pointer. | 2616 // objects in a heap space but above the allocation pointer. | 
| 2602 class VerifyPointersVisitor: public ObjectVisitor { | 2617 class VerifyPointersVisitor: public ObjectVisitor { | 
| 2603  public: | 2618  public: | 
| 2604   inline void VisitPointers(Object** start, Object** end); | 2619   inline void VisitPointers(Object** start, Object** end); | 
| 2605 }; | 2620 }; | 
| 2606 | 2621 | 
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3114   DisallowHeapAllocation no_allocation;  // i.e. no gc allowed. | 3129   DisallowHeapAllocation no_allocation;  // i.e. no gc allowed. | 
| 3115 | 3130 | 
| 3116  private: | 3131  private: | 
| 3117   DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3132   DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 
| 3118 }; | 3133 }; | 
| 3119 #endif  // DEBUG | 3134 #endif  // DEBUG | 
| 3120 | 3135 | 
| 3121 } }  // namespace v8::internal | 3136 } }  // namespace v8::internal | 
| 3122 | 3137 | 
| 3123 #endif  // V8_HEAP_H_ | 3138 #endif  // V8_HEAP_H_ | 
| OLD | NEW | 
|---|