Revision: 17313
Author:   [email protected]
Date:     Tue Oct 22 08:50:46 2013 UTC
Log:      Do not serialize stack limits.

This is part of making snapshots reproducable, more to come...

[email protected]

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

Modified:
 /branches/bleeding_edge/src/serialize.cc
 /branches/bleeding_edge/src/serialize.h

=======================================
--- /branches/bleeding_edge/src/serialize.cc    Tue Oct 15 16:12:25 2013 UTC
+++ /branches/bleeding_edge/src/serialize.cc    Tue Oct 22 08:50:46 2013 UTC
@@ -1324,6 +1324,14 @@
   this->VisitPointer(object);
   Pad();
 }
+
+
+bool Serializer::ShouldBeSkipped(Object** current) {
+  Object** roots = isolate()->heap()->roots_array_start();
+  return current == &roots[Heap::kStoreBufferTopRootIndex]
+      || current == &roots[Heap::kStackLimitRootIndex]
+      || current == &roots[Heap::kRealStackLimitRootIndex];
+}


 void Serializer::VisitPointers(Object** start, Object** end) {
@@ -1334,8 +1342,7 @@
       root_index_wave_front_ =
Max(root_index_wave_front_, static_cast<intptr_t>(current - start));
     }
-    if (reinterpret_cast<Address>(current) ==
-        isolate->heap()->store_buffer()->TopAddress()) {
+    if (ShouldBeSkipped(current)) {
       sink_->Put(kSkip, "Skip");
       sink_->PutInt(kPointerSize, "SkipOneWord");
     } else if ((*current)->IsSmi()) {
=======================================
--- /branches/bleeding_edge/src/serialize.h     Mon Oct 14 12:41:28 2013 UTC
+++ /branches/bleeding_edge/src/serialize.h     Tue Oct 22 08:50:46 2013 UTC
@@ -573,6 +573,10 @@

   int SpaceAreaSize(int space);

+ // Some roots should not be serialized, because their actual value depends on
+  // absolute addresses and they are reset after deserialization, anyway.
+  bool ShouldBeSkipped(Object** current);
+
   Isolate* isolate_;
   // Keep track of the fullness of each space in order to generate
   // relative addresses for back references.

--
--
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