Remove first GC pause.

Fixed error where we were prefetching the address of address of
objects.

Remove first paused by removing get dirty cards and replacing it
with card aging. We now age the cards before doing the checkpoint
instead of clearing them. This lets us know which cards were
dirtied before the start of the GC and which cards were dirtied
after.

Optimized FreeList slightly.

Change-Id: I39d6aac1839476d7541d83970c8b27b266e8a117
diff --git a/src/heap.h b/src/heap.h
index 6c4c38b..584718e 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -59,6 +59,17 @@
 typedef AtomicStack<Object*> ObjectStack;
 typedef std::vector<ContinuousSpace*> Spaces;
 
+class AgeCardVisitor {
+ public:
+  byte operator ()(byte card) const {
+    if (card == CardTable::kCardDirty) {
+      return card - 1;
+    } else {
+      return 0;
+    }
+  }
+};
+
 // The ordering of the enum matters, it is used to determine which GCs are run first.
 enum GcType {
   // No Gc
@@ -382,7 +393,7 @@
   void SwapStacks();
 
   // Clear cards and update the mod union table.
-  void ClearCards(TimingLogger& timings);
+  void ProcessCards(TimingLogger& timings);
 
   Spaces spaces_;