Move mirror::ArtMethod to native
Optimizing + quick tests are passing, devices boot.
TODO: Test and fix bugs in mips64.
Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.
Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
diff --git a/runtime/base/iteration_range.h b/runtime/base/iteration_range.h
index 5a46376..6a0ef1f 100644
--- a/runtime/base/iteration_range.h
+++ b/runtime/base/iteration_range.h
@@ -17,6 +17,8 @@
#ifndef ART_RUNTIME_BASE_ITERATION_RANGE_H_
#define ART_RUNTIME_BASE_ITERATION_RANGE_H_
+#include <iterator>
+
namespace art {
// Helper class that acts as a container for range-based loops, given an iteration
@@ -38,10 +40,15 @@
iterator cend() const { return last_; }
private:
- iterator first_;
- iterator last_;
+ const iterator first_;
+ const iterator last_;
};
+template <typename Iter>
+static inline IterationRange<Iter> MakeIterationRange(const Iter& begin_it, const Iter& end_it) {
+ return IterationRange<Iter>(begin_it, end_it);
+}
+
} // namespace art
#endif // ART_RUNTIME_BASE_ITERATION_RANGE_H_