Revision: 18689
Author:   [email protected]
Date:     Mon Jan 20 11:57:56 2014 UTC
Log:      Explicitly initialize MarkCompactCollector and ExternalStringTable

BUG=none
[email protected]
LOG=n

Review URL: https://codereview.chromium.org/143063003
http://code.google.com/p/v8/source/detail?r=18689

Modified:
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h
 /branches/bleeding_edge/src/mark-compact.cc
 /branches/bleeding_edge/src/mark-compact.h

=======================================
--- /branches/bleeding_edge/src/heap.cc Fri Jan 17 10:27:57 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Mon Jan 20 11:57:56 2014 UTC
@@ -134,6 +134,7 @@
       last_gc_end_timestamp_(0.0),
       marking_time_(0.0),
       sweeping_time_(0.0),
+      mark_compact_collector_(this),
       store_buffer_(this),
       marking_(this),
       incremental_marking_(this),
@@ -152,6 +153,7 @@
       allocation_sites_scratchpad_length(0),
       promotion_queue_(this),
       configured_(false),
+      external_string_table_(this),
       chunks_queued_for_free_(NULL),
       relocation_mutex_(NULL) {
   // Allow build-time customization of the max semispace size. Building
@@ -177,8 +179,6 @@
   native_contexts_list_ = NULL;
   array_buffers_list_ = Smi::FromInt(0);
   allocation_sites_list_ = Smi::FromInt(0);
-  mark_compact_collector_.heap_ = this;
-  external_string_table_.heap_ = this;
   // Put a dummy entry in the remembered pages so we can find the list the
   // minidump even if there are no real unmapped pages.
   RememberUnmappedPage(NULL, false);
=======================================
--- /branches/bleeding_edge/src/heap.h  Fri Jan 17 10:27:57 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Mon Jan 20 11:57:56 2014 UTC
@@ -462,7 +462,7 @@
   void TearDown();

  private:
-  ExternalStringTable() { }
+  explicit ExternalStringTable(Heap* heap) : heap_(heap) { }

   friend class Heap;

=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Wed Jan 15 11:42:19 2014 UTC
+++ /branches/bleeding_edge/src/mark-compact.cc Mon Jan 20 11:57:56 2014 UTC
@@ -56,7 +56,7 @@
// -------------------------------------------------------------------------
 // MarkCompactCollector

-MarkCompactCollector::MarkCompactCollector() :  // NOLINT
+MarkCompactCollector::MarkCompactCollector(Heap* heap) :  // NOLINT
 #ifdef DEBUG
       state_(IDLE),
 #endif
@@ -70,7 +70,7 @@
       sequential_sweeping_(false),
       tracer_(NULL),
       migration_slots_buffer_(NULL),
-      heap_(NULL),
+      heap_(heap),
       code_flusher_(NULL),
       encountered_weak_collections_(NULL),
       have_code_to_deoptimize_(false) { }
=======================================
--- /branches/bleeding_edge/src/mark-compact.h  Wed Nov 27 14:03:40 2013 UTC
+++ /branches/bleeding_edge/src/mark-compact.h  Mon Jan 20 11:57:56 2014 UTC
@@ -744,7 +744,7 @@
   void MarkAllocationSite(AllocationSite* site);

  private:
-  MarkCompactCollector();
+  explicit MarkCompactCollector(Heap* heap);
   ~MarkCompactCollector();

   bool MarkInvalidatedCode();

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to