summaryrefslogtreecommitdiffstats
path: root/runtime/interpreter/interpreter_common.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-09-23 11:58:57 -0700
committerIan Rogers <irogers@google.com>2013-09-23 11:58:57 -0700
commit2e2deeb6df3e5a952c194276146706e63ab644a1 (patch)
tree76f985d763a895c59c4a1e9f70a3f7d58cc6b9a3 /runtime/interpreter/interpreter_common.h
parenta67249065e4c9b3cf4a7c081d95a78df28291ee9 (diff)
downloadart-2e2deeb6df3e5a952c194276146706e63ab644a1.zip
art-2e2deeb6df3e5a952c194276146706e63ab644a1.tar.gz
art-2e2deeb6df3e5a952c194276146706e63ab644a1.tar.bz2
Fix compiler warning in interpreter.
Change-Id: I320a8dbbd27bf7d20cf8b60a3e5d0aaebcda861e
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r--runtime/interpreter/interpreter_common.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index ec1f942..a6c5e62 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -81,12 +81,6 @@ extern JValue ExecuteGotoImpl(Thread* self, MethodHelper& mh,
ShadowFrame& shadow_frame, JValue result_register)
NO_THREAD_SAFETY_ANALYSIS __attribute__((hot));
-// Common part of both implementations.
-static const int32_t kMaxInt = std::numeric_limits<int32_t>::max();
-static const int32_t kMinInt = std::numeric_limits<int32_t>::min();
-static const int64_t kMaxLong = std::numeric_limits<int64_t>::max();
-static const int64_t kMinLong = std::numeric_limits<int64_t>::min();
-
void UnstartedRuntimeInvoke(Thread* self, MethodHelper& mh,
const DexFile::CodeItem* code_item, ShadowFrame* shadow_frame,
JValue* result, size_t arg_offset)
@@ -321,6 +315,7 @@ static inline String* ResolveString(Thread* self, MethodHelper& mh, uint32_t str
static inline bool DoIntDivide(ShadowFrame& shadow_frame, size_t result_reg,
int32_t dividend, int32_t divisor)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ const int32_t kMinInt = std::numeric_limits<int32_t>::min();
if (UNLIKELY(divisor == 0)) {
ThrowArithmeticExceptionDivideByZero();
return false;
@@ -336,6 +331,7 @@ static inline bool DoIntDivide(ShadowFrame& shadow_frame, size_t result_reg,
static inline bool DoIntRemainder(ShadowFrame& shadow_frame, size_t result_reg,
int32_t dividend, int32_t divisor)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ const int32_t kMinInt = std::numeric_limits<int32_t>::min();
if (UNLIKELY(divisor == 0)) {
ThrowArithmeticExceptionDivideByZero();
return false;
@@ -351,6 +347,7 @@ static inline bool DoIntRemainder(ShadowFrame& shadow_frame, size_t result_reg,
static inline bool DoLongDivide(ShadowFrame& shadow_frame, size_t result_reg,
int64_t dividend, int64_t divisor)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ const int64_t kMinLong = std::numeric_limits<int64_t>::min();
if (UNLIKELY(divisor == 0)) {
ThrowArithmeticExceptionDivideByZero();
return false;
@@ -366,6 +363,7 @@ static inline bool DoLongDivide(ShadowFrame& shadow_frame, size_t result_reg,
static inline bool DoLongRemainder(ShadowFrame& shadow_frame, size_t result_reg,
int64_t dividend, int64_t divisor)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ const int64_t kMinLong = std::numeric_limits<int64_t>::min();
if (UNLIKELY(divisor == 0)) {
ThrowArithmeticExceptionDivideByZero();
return false;