ART: More header cleanup - CC
Forward-declare AtomicStack in CC. Use stack_reference in atomic_stack.h.
Test: mmma art
Change-Id: I863ca8d4a8dfd5e83279fd68ea0e1a94c3c5df6d
(cherry picked from commit 291ce17ada5a126be99f0fc069a028d2100bcf9e)
diff --git a/runtime/gc/accounting/atomic_stack.h b/runtime/gc/accounting/atomic_stack.h
index db9568a..351798e 100644
--- a/runtime/gc/accounting/atomic_stack.h
+++ b/runtime/gc/accounting/atomic_stack.h
@@ -17,6 +17,8 @@
#ifndef ART_RUNTIME_GC_ACCOUNTING_ATOMIC_STACK_H_
#define ART_RUNTIME_GC_ACCOUNTING_ATOMIC_STACK_H_
+#include <sys/mman.h> // For the PROT_* and MAP_* constants.
+
#include <algorithm>
#include <memory>
#include <string>
@@ -25,7 +27,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "mem_map.h"
-#include "stack.h"
+#include "stack_reference.h"
namespace art {
namespace gc {
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index 80b569a..e193d2a 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -22,8 +22,10 @@
#include "base/stl_util.h"
#include "base/systrace.h"
#include "debugger.h"
+#include "gc/accounting/atomic_stack.h"
#include "gc/accounting/heap_bitmap-inl.h"
#include "gc/accounting/mod_union_table-inl.h"
+#include "gc/accounting/read_barrier_table.h"
#include "gc/accounting/space_bitmap-inl.h"
#include "gc/gc_pause_listener.h"
#include "gc/reference_processor.h"
diff --git a/runtime/gc/collector/concurrent_copying.h b/runtime/gc/collector/concurrent_copying.h
index c21520d..f877314 100644
--- a/runtime/gc/collector/concurrent_copying.h
+++ b/runtime/gc/collector/concurrent_copying.h
@@ -23,8 +23,6 @@
#include "jni.h"
#include "object_callbacks.h"
#include "offsets.h"
-#include "gc/accounting/atomic_stack.h"
-#include "gc/accounting/read_barrier_table.h"
#include "gc/accounting/space_bitmap.h"
#include "mirror/object.h"
#include "mirror/object_reference.h"
@@ -40,8 +38,11 @@
namespace gc {
namespace accounting {
+ template<typename T> class AtomicStack;
+ typedef AtomicStack<mirror::Object> ObjectStack;
typedef SpaceBitmap<kObjectAlignment> ContinuousSpaceBitmap;
class HeapBitmap;
+ class ReadBarrierTable;
} // namespace accounting
namespace space {