summaryrefslogtreecommitdiff
path: root/compiler/jni/quick/calling_convention.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-04-13 11:59:46 +0100
committer Vladimir Marko <vmarko@google.com> 2016-04-13 17:50:16 +0100
commit93205e395f777c1dd81d3f164cf9a4aec4bde45f (patch)
tree1d08efd9b7bca9fe23df9ae9489c5dd575d3c6df /compiler/jni/quick/calling_convention.h
parent6990775e323cd9164d6cc10955a047b9d9f15f32 (diff)
Move Assemblers to the Arena.
And clean up some APIs to return std::unique_ptr<> instead of raw pointers that don't communicate ownership. Change-Id: I3017302307a0253d661240750298802fb0d9585e
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r--compiler/jni/quick/calling_convention.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
index 243d124455..2c4b15ca31 100644
--- a/compiler/jni/quick/calling_convention.h
+++ b/compiler/jni/quick/calling_convention.h
@@ -18,6 +18,8 @@
#define ART_COMPILER_JNI_QUICK_CALLING_CONVENTION_H_
#include <vector>
+
+#include "base/arena_object.h"
#include "handle_scope.h"
#include "primitive.h"
#include "thread.h"
@@ -26,7 +28,7 @@
namespace art {
// Top-level abstraction for different calling conventions.
-class CallingConvention {
+class CallingConvention : public DeletableArenaObject<kArenaAllocCallingConvention> {
public:
bool IsReturnAReference() const { return shorty_[0] == 'L'; }
@@ -221,9 +223,11 @@ class CallingConvention {
// | { Method* } | <-- SP
class ManagedRuntimeCallingConvention : public CallingConvention {
public:
- static ManagedRuntimeCallingConvention* Create(bool is_static, bool is_synchronized,
- const char* shorty,
- InstructionSet instruction_set);
+ static std::unique_ptr<ManagedRuntimeCallingConvention> Create(ArenaAllocator* arena,
+ bool is_static,
+ bool is_synchronized,
+ const char* shorty,
+ InstructionSet instruction_set);
// Register that holds the incoming method argument
virtual ManagedRegister MethodRegister() = 0;
@@ -249,7 +253,9 @@ class ManagedRuntimeCallingConvention : public CallingConvention {
virtual const ManagedRegisterEntrySpills& EntrySpills() = 0;
protected:
- ManagedRuntimeCallingConvention(bool is_static, bool is_synchronized, const char* shorty,
+ ManagedRuntimeCallingConvention(bool is_static,
+ bool is_synchronized,
+ const char* shorty,
size_t frame_pointer_size)
: CallingConvention(is_static, is_synchronized, shorty, frame_pointer_size) {}
};
@@ -270,8 +276,11 @@ class ManagedRuntimeCallingConvention : public CallingConvention {
// callee saves for frames above this one.
class JniCallingConvention : public CallingConvention {
public:
- static JniCallingConvention* Create(bool is_static, bool is_synchronized, const char* shorty,
- InstructionSet instruction_set);
+ static std::unique_ptr<JniCallingConvention> Create(ArenaAllocator* arena,
+ bool is_static,
+ bool is_synchronized,
+ const char* shorty,
+ InstructionSet instruction_set);
// Size of frame excluding space for outgoing args (its assumed Method* is
// always at the bottom of a frame, but this doesn't work for outgoing