From f4da675bbc4615c5f854c81964cac9dd1153baea Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 1 Aug 2014 19:04:18 +0100 Subject: Implement method calls using relative BL on ARM. Store the linker patches with each CompiledMethod instead of keeping them in CompilerDriver. Reorganize oat file creation to apply the patches as we're writing the method code. Add framework for platform-specific relative call patches in the OatWriter. Implement relative call patches for ARM. Change-Id: Ie2effb3d92b61ac8f356140eba09dc37d62290f8 --- compiler/utils/array_ref.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'compiler/utils/array_ref.h') diff --git a/compiler/utils/array_ref.h b/compiler/utils/array_ref.h index 2d70b7dd31..e6b4a6a47c 100644 --- a/compiler/utils/array_ref.h +++ b/compiler/utils/array_ref.h @@ -82,12 +82,13 @@ class ArrayRef { : array_(array), size_(size) { } - explicit ArrayRef(std::vector& v) + template + explicit ArrayRef(std::vector& v) : array_(v.data()), size_(v.size()) { } - template - ArrayRef(const std::vector& v, + template + ArrayRef(const std::vector& v, typename std::enable_if::value, tag>::tag t = tag()) : array_(v.data()), size_(v.size()) { } @@ -167,6 +168,16 @@ class ArrayRef { size_t size_; }; +template +bool operator==(const ArrayRef& lhs, const ArrayRef& rhs) { + return lhs.size() == rhs.size() && std::equal(lhs.begin(), lhs.end(), rhs.begin()); +} + +template +bool operator!=(const ArrayRef& lhs, const ArrayRef& rhs) { + return !(lhs == rhs); +} + } // namespace art -- cgit v1.2.3-59-g8ed1b