summaryrefslogtreecommitdiff
path: root/compiler/jni/quick/calling_convention.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-07-26 09:02:02 -0700
committer Andreas Gampe <agampe@google.com> 2016-08-01 18:54:48 -0700
commit542451cc546779f5c67840e105c51205a1b0a8fd (patch)
tree11e09bb5abaee12dddffefbe7e425291076dfa7a /compiler/jni/quick/calling_convention.h
parent85c4a4b8c9eabfe16e4e49f9b4aa78c1bf4be023 (diff)
ART: Convert pointer size to enum
Move away from size_t to dedicated enum (class). Bug: 30373134 Bug: 30419309 Test: m test-art-host Change-Id: Id453c330f1065012e7d4f9fc24ac477cc9bb9269
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r--compiler/jni/quick/calling_convention.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
index e8f738d4d7..995fa51d44 100644
--- a/compiler/jni/quick/calling_convention.h
+++ b/compiler/jni/quick/calling_convention.h
@@ -18,6 +18,7 @@
#define ART_COMPILER_JNI_QUICK_CALLING_CONVENTION_H_
#include "base/arena_object.h"
+#include "base/enums.h"
#include "handle_scope.h"
#include "primitive.h"
#include "thread.h"
@@ -70,8 +71,10 @@ class CallingConvention : public DeletableArenaObject<kArenaAllocCallingConventi
virtual ~CallingConvention() {}
protected:
- CallingConvention(bool is_static, bool is_synchronized, const char* shorty,
- size_t frame_pointer_size)
+ CallingConvention(bool is_static,
+ bool is_synchronized,
+ const char* shorty,
+ PointerSize frame_pointer_size)
: itr_slots_(0), itr_refs_(0), itr_args_(0), itr_longs_and_doubles_(0),
itr_float_and_doubles_(0), displacement_(0),
frame_pointer_size_(frame_pointer_size),
@@ -198,7 +201,7 @@ class CallingConvention : public DeletableArenaObject<kArenaAllocCallingConventi
// Space for frames below this on the stack.
FrameOffset displacement_;
// The size of a pointer.
- const size_t frame_pointer_size_;
+ const PointerSize frame_pointer_size_;
// The size of a reference entry within the handle scope.
const size_t handle_scope_pointer_size_;
@@ -255,7 +258,7 @@ class ManagedRuntimeCallingConvention : public CallingConvention {
ManagedRuntimeCallingConvention(bool is_static,
bool is_synchronized,
const char* shorty,
- size_t frame_pointer_size)
+ PointerSize frame_pointer_size)
: CallingConvention(is_static, is_synchronized, shorty, frame_pointer_size) {}
};
@@ -328,7 +331,7 @@ class JniCallingConvention : public CallingConvention {
// Position of handle scope and interior fields
FrameOffset HandleScopeOffset() const {
- return FrameOffset(this->displacement_.Int32Value() + frame_pointer_size_);
+ return FrameOffset(this->displacement_.Int32Value() + static_cast<size_t>(frame_pointer_size_));
// above Method reference
}
@@ -356,8 +359,10 @@ class JniCallingConvention : public CallingConvention {
kObjectOrClass = 1
};
- JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty,
- size_t frame_pointer_size)
+ JniCallingConvention(bool is_static,
+ bool is_synchronized,
+ const char* shorty,
+ PointerSize frame_pointer_size)
: CallingConvention(is_static, is_synchronized, shorty, frame_pointer_size) {}
// Number of stack slots for outgoing arguments, above which the handle scope is