OSDN Git Service

interpreter: Remove unnecessary template arg from DoCallCommon.
authorNarayan Kamath <narayan@google.com>
Mon, 3 Oct 2016 15:51:22 +0000 (16:51 +0100)
committerNarayan Kamath <narayan@google.com>
Tue, 4 Oct 2016 08:35:00 +0000 (08:35 +0000)
The function was always called with a fixed size array so there's
no real advantage in templatizing it this way.

Test: make build-art-host

Change-Id: I782e113225f1c97877f2bcb5afe8df9ae8efd26e

runtime/interpreter/interpreter_common.cc

index edd28e1..7a6162c 100644 (file)
@@ -504,15 +504,14 @@ void AbortTransactionV(Thread* self, const char* fmt, va_list args) {
 
 // Separate declaration is required solely for the attributes.
 template <bool is_range,
-          bool do_assignability_check,
-          size_t kVarArgMax>
+          bool do_assignability_check>
     REQUIRES_SHARED(Locks::mutator_lock_)
 static inline bool DoCallCommon(ArtMethod* called_method,
                                 Thread* self,
                                 ShadowFrame& shadow_frame,
                                 JValue* result,
                                 uint16_t number_of_inputs,
-                                uint32_t (&arg)[kVarArgMax],
+                                uint32_t (&arg)[Instruction::kMaxVarArgRegs],
                                 uint32_t vregC) ALWAYS_INLINE;
 
 void ArtInterpreterToCompiledCodeBridge(Thread* self,
@@ -578,14 +577,13 @@ void SetStringInitValueToAllAliases(ShadowFrame* shadow_frame,
 }
 
 template <bool is_range,
-          bool do_assignability_check,
-          size_t kVarArgMax>
+          bool do_assignability_check>
 static inline bool DoCallCommon(ArtMethod* called_method,
                                 Thread* self,
                                 ShadowFrame& shadow_frame,
                                 JValue* result,
                                 uint16_t number_of_inputs,
-                                uint32_t (&arg)[kVarArgMax],
+                                uint32_t (&arg)[Instruction::kMaxVarArgRegs],
                                 uint32_t vregC) {
   bool string_init = false;
   // Replace calls to String.<init> with equivalent StringFactory call.