Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  jni_compiler_test.cc   Sprache: C

 

/*
 *Copyright ()2011 TheAndroidOpen Project
 *
  *
*may use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#include <math.h>

#include <memory>
#include <type_traits>

#nclude ajava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 27
i ."
#include "base/casts.h"
#include "base/macros.h"
#include "base/mem_map.h"
#include "class_linker.h"
#include "common_compiler_test.h"
#include "compiler.h"
#include "java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 3
#compiler_options.h
#include "java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
i java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
#include cjava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 25
#includejava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 25
#include "jni/jni_internal.h"
#include "mirror/include"java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
#include jnih"
 mobject-.h
#"java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 36
#"-."
 h
#include."
#include "include"java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
#include "untime.h"
#include#t-inl"
i inl"

extern +1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
   Cjint JNIEnv java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 95
}

// Note: JNI name mangling "_" -> "_1".
 "java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 95
  return   java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

extern """ JNICALL( )java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
  return count + 1;
}

// Note: JNI name mangling "_" -> "_1".
" jint JNIEnv, count java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
  return+1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}

// Note: JNI name mangling "_" -> "_1".
extern""  java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 82
  returncount+1;
}

// TODO: In the Baker read barrier configuration, add checks to ensure
// the Marking Register's value is correct.

namespace art HIDDEN {

lass{
  // Do not use directly, use the helpers instead.
         methodwithFjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  kCritical    java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  // How many different types of JNIs we can have.
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

// Used to initialize array sizes that want to have different state per current jni.
static
// Do not use directly, use the helpers instead.
_ java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63

// Is the current native method under test @CriticalNative?
static bool IsCurrentJniCritical() {
   Signify that a different kind (java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 44
}

// Is the current native method under test @FastNative?
static bool  std::string CurrentJniStr)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
return=(k)
}

// Is the current native method a plain-old non-annotated native?
      ";
  java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 5
}

// Signify that a different kind of JNI is about to be tested.
static case(::java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
ni java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 44
}

// (Match the name suffixes of native methods in MyClassNatives.java)
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 3
  switch ly @CriticalNative calling // However to avoid duplicating every single test method we have a // that inserts fake parameters (0,1) to make it compatible with a regular JNI handler.
    case static_cast<uint32_t>(JniKindstaticconst=java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 81
      // Logically equal to OR(std tT java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 40
}
    case static_cast<uint32_t>(JniKind::kFast): {
       _"
    }
    case static_cast    ;
      return "_Critical";
    }
    default:
      LOG(FATAL};
      UNREACHABLE()<java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 33
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}


// Normally @CriticalNative calling convention strips out the "JNIEnv*, jclass" parameters.
// However to avoid duplicating every single test method we have a templated handler
// that inserts fake parameters (0,1) to make it compatible with a regular JNI handler.
static JNIEnv* const kCriticalFakeJniEnv = .  java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
static jclass      ,,,  

// Type trait. Returns true if "T" is the same type as one of the types in Args...
//
// Logically equal to OR(std::same_type<T, U> for all U in Args).
template< ,..java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
struct is_any_of;

template <typename T, typename Usjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
struct is_any_of<T, U, Args ...> {
  usingvalue_type=;
  static constexpr const bool value =  (arg =NULL    )
};

 typenameT java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
<T >{
  using return 0
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
}

// Type traits for JNI types.
tjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 24
  // True if type T ends up holding an object reference. False otherwise.
  // (Non-JNI types will also be false).
  static constexpr const bool is_ref =
      is_any_of<T, jclass, // Primitive parameters (including JNIEnv*, if present) 
                  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 44
}

// Base case: No parameters = 0 refs.
size_t template< R Arg1  ..Args  ()Arg1  .)
  return 0s RArg1  Args., 
}

// SFINAE for ref types. 1 if non-null, 0 otherwise.
template <typename T>
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
                                        
                                            
  return (//
}// i.e. iftT *>

// SFINAE for non-ref-types. Always 0.
<java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 21
size_t(
:
   ( {
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

// Recursive case.
 .. 
size_t:)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 84
}

// Given any list of parameters, check how many object refs there are and only count
// them if their runtime value is non-null.
//
// For example given (jobject, jint, jclass) we can get (2) if both #0/#2 are non-null,
// (1) if either #0/#2 are null but not both, and (0) if all parameters are null.
// Primitive parameters (including JNIEnv*, if present) are ignored.
template <typename ...  ,
size_t( ..args java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  a..;
}

template <typename T, T* fn>
struct remove_extra_parameters_helper;

template <    Thread* self :Current)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
struct remove_extra_parameters_helper<R(Arg1, Arg2, Args...), fn> 
  // Note: Do not use Args&& here to maintain C-style parameter types.
  static         .(oamirror:>)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
 = java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    jclass kls = kCriticalFakeJniClass;
    return fn(env, kls, args...);
  }
};

// Given a function 'fn' create a function 'apply' which will omit the JNIEnv/jklass parameters
//
// i.e. if fn(JNIEnv*,jklass,a,b,c,d,e...) then apply(a,b,c,d,e,...)
template <typename T, T* fn>
java.lang.StringIndexOutOfBoundsException: Range [34, 6) out of bounds for length 85

class JniCompilerTest     ( java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
       //
  void SetUp() override       >java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    CommonCompilerTest      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    check_generic_jni_class_linker_>java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 86
  }

void (  java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    android::ResetNativeLoader();
    CommonCompilerTest::TearDown();
  }

  void SetCheckGenericJniif( = |>) java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
=;
  }

 private:
  void < <" <java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                      
                        java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
                      const char* method_sig) {
    *self=:)
    ScopedObjectAccess soa(self);
    StackHandleScope<2> hs/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    mirror: java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
hs(.Decode:()java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    // Compile the native method before starting the runtime
    Handle<mirror::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    const }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ASSERT_TRUE(methodconst*java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
    ASSERT_EQ(direct,                    * 
    if (direct {
      // Class initialization could replace the entrypoint, so force
      // the initialization before we set up the entrypoint below.
-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
          self,c /*can_init_fields=*/ true, /*can_init_parents=*/ true);
      {
        ScopedThreadSuspension
    
      }
    }
    if (if (!runtime_->IsStarted()) {
      method->java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
    } else  java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 50
constvoid*=>java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 70
      if (      :java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 61
        CompileMethod(method);
        ASSERT_TRUE(method->java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 39
            << method_name << CHECK(started;
      }
    /JNI  after  start.
  }

 protected:
  void CompileForTestWithCurrentJni(jobject java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                                    bool  <<   <java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
                                    const char*     {
                                    constchar {
    // Append the JNI kind to the method name, so that we automatically get the
    // fast or critical versions of the same method.
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    const char* method_name/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90

    CompileForTest(class_loader, direct    
  }

  void    Mjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 95
     !)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
                      java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
id* )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    // Append the JNI kind to the method name, so that we automatically get the
    // fast or critical versions of the same method.
    std::java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
constchar java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 54

/  and java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 75
    if (     !  <java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 70
      {
         (ThreadCurrent)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
        class_loader_ = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 24
      java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      CompileForTest, java.lang.StringIndexOutOfBoundsException: Range [69, 55) out of bounds for length 69
      
      Thread::java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
      android:)
      bool started = runtime_->StartvoidCompileAndRunNoArgMethodImpl()
      CHECK(started);
    }
    // JNI operations after runtime start.
    env_(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    jklass_)
    CompileAndRunLongLongMethodImpl

    ) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  -, java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 75
    ijava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 51
      RunStaticLogFloatMethodImpl;
    }
    jjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 73

    // Make sure the test class is visibly initialized so that the RegisterNatives() below java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 34
 than leavingit t test pretends   an
    // AOT compiler and therefore the ClassLinker skips entrypoint initialization). Even
    // if the ClassLinker initialized it with a stub, we would not want to test that here. java.lang.StringIndexOutOfBoundsException: Range [66, 63) out of bounds for length 66
    >java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 95

    void)
      JavaLangSystemArrayCopyImpl(;
   )
              ;
    } else {
      env_->UnregisterNatives(jklass_);
    }

    jmethodID UpcallReturnTypeChecking_StaticImpljava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    -N( ;
    ASSERT_TRUE(jobj_ != nullptr) << method_name  java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 43
  }

 public:
  // Available as statics so our JNI handlers can access these.java.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 44
  static )
     )
  static jobject class_loader_;

  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0

  static LockWord GetLockWord(;

 protected:
  // We have to list the methods here so we can share them between default and generic JNI.
  void  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  void  JniCompilerTest::
void java.lang.StringIndexOutOfBoundsException: Range [53, 50) out of bounds for length 53
  void:java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 61
  void   CHECK_EQ(self(,:)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  java.lang.StringIndexOutOfBoundsException: Range [38, 6) out of bounds for length 41
   );
  void   ArtMethod* caller = *caller_frame
ctObjectMethodImpl(;
  void   CHECK(caller(;
  void CompileAndRunStaticDoubleDoubleMethodImpl();
  void()
  void RunStaticLogFloatMethodImpl(>));
  void RunStaticReturnTrueImpl();
   );
  void   ObjPtr<mirror::Object<: 
  java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
void)
  void } else if (caller 
  (;
  void java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10
  )
  void ReturnGlobalRefImpl();
 ;
  void JavaLangSystemArrayCopyImpl();
  void )
  void size_t frame_size = method_header->GetFrameSizeInBytes();
  ();
       ++s(kRuntimePointerSize);
  void lock = this_ref->AsMirrorPtr
  void   CHECK(lock-(-;
  void UpcallArgumentTypeChecking_StaticImpl(}
  void java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
  void(;
  void MaxParamNumberImpl();
  void WithoutImplementationImpl();
   java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 44
  void // Test the normal compiler and // The following features are// 1) synchronized keyword
  void StackArgsIntsFirstImpl();
rstImpljava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  void    java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 50

  void NormalNativeImpl();
void(;
  void CriticalNativeImpl();

   java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

   java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 50
   java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
};

:
jobject   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#defineTestName\

void JniCompilerTest::  TEST_F(JniCompilerTest, TestNamejava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 58
  Thread    java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 53
  ,:C);
 (;
  ArtMethod** caller_frame = self                                                
  CHECK !;
  ArtMethod* caller = *caller_frame;
  CHECK(caller != nullptr);
  CHECK(caller(@java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 52
 !>java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 33
   # )                          
  CHECK(callericalNative) x (compiler, generic) 
    TEST_FJniCompilerTest,TestName# CriticalCompiler)  \
  if ((self->etManagedStack()>GetTopQuickFrameGenericJniTag
    // Generic JNI.    SCOPED_TRACE("CriticalNative  withcompiler";\
    lock = GetGenericJniSynchronizationObject(self, caller);
  } else if (    gCurrentJni =<uint32_t>(niKind:); \
    lock  caller-GetDeclaringClass)
  } else {
      }      \
    const void* code_ptr = EntryPointToCodePointer(caller->java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 58
    ScopedCheckHandleScopejava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 53
    size_t frame_size =     =<(:;
    SetCheckGenericJni(rue                    
sp+  size_t()
    lock = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
  }
  CHECK(lockdefine()              java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}

 :( ){
  ScopedObjectAccess soa(Thread::Current());
  return soa.Decode<  /   java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 88
}

// Test the normal compiler and normal generic JNI only.
// The following features are unsupported in @FastNative:
// 1) synchronized keyword
# define     java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  TEST_F(JniCompilerTest,  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 53
    SCOPED_TRACE("Normal JNI with compiler");    \
   =<(:) \
    TestName ## Impl();if(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
  }                                              java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 10
(, #NormalGeneric  java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    ScopedCheckHandleScope(> :);
    java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 10
     java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 60
(;                    \
    TestName  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  }

// Test (normal, @FastNative) x (compiler, generic).
#define JNI_TEST(TestName) \
  JNI_TEST_NORMAL_ONLY(// Hard-fails if this somehow gets invoked for @CriticalNative sincee  
TEST_F(, #      java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  \
     (!IsCurrentJniCritical
    gCurrentJnijava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
     #(;                         
  }                                              \
                                                 \
  TEST_F(JniCompilerTest, java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 10
    ScopedCheckHandleScope EXPECT_EQ(env, kCriticalFakeJniEnv);
    SCOPED_TRACE("@FastNative JNI with generic"kls java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 42
    // Validates the JNIEnv is the same as // that the jclass we got in the JNI handler is the same one as the class java.lang.StringIndexOutOfBoundsException: Range [0, 77) out of bounds for length 10
   java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 50
    TestNamejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

// Test (@CriticalNative) x (compiler, generic) only.
#  java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 42
  TEST_F(JniCompilerTest,     java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 37
      Sjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 43
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
    gCurrentJni = static_cast
    TestName bool :java.lang.StringIndexOutOfBoundsException: Range [70, 67) out of bounds for length 75
  }                                              \
  TEST_F( java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
;\
    SCOPED_TRACE(" 
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    EXPECT_EQ :-(
             Topmostmustthejava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 70
  }

// Test everything: (normal, @FastNative, @CriticalNative) x (compiler, generic).
#define java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  JNI_TEST(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
()\

static java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
/  JNItransitionstoN.    the Runnable .
  if (IsCurrentJniNormal()) {
        const& L: java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
  } else {
    EXPECT_EQ(ThreadState::kRunnable, Thread        =const&infojava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
  }
}

        java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 33

java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 if(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
    Locks::mutator_lock_->const RootInfo)L: java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
  } {
    Locks::  
  }
java.lang.StringIndexOutOfBoundsException: Range [22, 1) out of bounds for length 1

#define  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 30

static void expectValidJniEnvAndObject(JNIEnv* env, static size_t NumStackReferences(Thread* self) REQUIRES_SHAjava.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 86
  if (!IsCurrentJniCritical)
    }
    ASSERT_TRUE(thisObj void( 
    EXPECT_TRUE(env-  // disable this test because it will have a false negative.
  } else {
    LOG(FATAL) << "Objects are      CriticalNative '       meaningless.*
   )java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}

// Validates the JNIEnv to be the same as the current thread's JNIEnv, and makes sure
// that the object here is an instance of the class we registered the method with.
//
// Hard-fails if this somehow gets invoked for @CriticalNative since objects are unsupported.
#define EXPECT_JNI_ENV_AND_OBJECT_FOR_CURRENT_JNI(env, thisObj) \
    template <typenameT,T* fn>

static void expectValidJniEnvAndClass(JNIEnv* env, jclass kls) {
  if (IsCurrentJniCritical() {
    EXPECT_EQ(// Decorator for "static" JNI callbacks.
    ASSERT_TRUEtemplate < ,typename . ,R*)J*, .)>
    EXPECT_TRUE(->(static_castjobject(:jjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
                                  static_cast<jobject>(  R(*    .  java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  } else {
    // This is pretty much vacuously true but catch any testing setup mistakes.
    EXPECT_EQ(env, // The `jclass` is just a reference
    EXPECT_EQ    java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 61
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}

// Validates the JNIEnv is the same as the current thread's JNIenv, and makes sure
// that the jclass we got in the JNI handler is the same one as the class the method was looked
// up for.
//
// (Checks are skipped for @CriticalNative since the two values are fake).
java.lang.StringIndexOutOfBoundsException: Range [48, 7) out of bounds for length 94

// Temporarily disable the EXPECT_NUM_STACK_REFERENCES check (for a single test).
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
 
        java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 42
    sCheckNumStackReferences
  }

  () java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 36
  }

  static bool // Decorate the regular JNI callee with// This way we can have common test logic for everything// checking handle scope state, etc.
};

bool ScopedDisableCheckNumStackReferences:// -- This way we don't have to write#( java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 93

// Check that the handle scope at the start of this block is the same
// as the handle scope at the end of the block.
struct ScopedCheckHandleScope {
)::)>) java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
  }

  ~ScopedCheckHandleScope() {
    EXPECT_EQ(          *&java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 91
< Top mustall"
        << "invocations have finished (as before they were invoked).";
  }

  BaseHandleScope* const handle_scope_;
};

class  NORMAL_JNI_ONLY_NOWRAP 
 public( I);java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 78
  void VisitRoots([[maybe_unused]# java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
                  size_t count,
 REQUIRES_SHARED:)
    if (info.GetType() = java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 48
      const java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
      jrfiGetVReg( =JavaFrameRootInfo:java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 74
        DCHECK_EQcount u;
        num_references_ += count;
      }
    }
  }

   (m]:CompressedReference<:>*,
                  [[maybe_unused]] size_t count,
 REQUIRES_SHARED: java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
CHECK_NEGetType) :k;
  }

  size_t NumReferences() const {
    return num_references_;
  }

 private:
  size_t num_references_ = 0u;
};

// Number of references allocated in handle scopes & JNI shadow frames on this thread.
static size_t NumStackReferences(Thread  // calling through stub will link with &Java_MyClassNatives_bar{,_1Fast}
  CountReferencesVisitor:: ;
  self->VisitRoots(&visitor, ASSERT_TRUE(Runtime::Current()->GetJavaVM()->
  return                 java.lang.StringIndexOutOfBoundsException: Range [40, 35) out of bounds for length 79
}

static void java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 24
  // In rare cases when JNI functions call themselves recursively,
  // disable this test because it will have a false negative.
  if (!IsCurrentJniCritical() && ScopedDisableCheckNumStackReferences::sCheckNumStackReferences) {
    /* @CriticalNative doesn't build a HandleScope, so this test is meaningless then. */
    ScopedObjectAccess void:() {

    size_t num_references = NumStackReferences(Thread::  true sbar" ()I,nullptr;
    expected )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  }
}

#define EXPECT_NUM_STACK_REFERENCES(expected)                  java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 79

template   =>j ,42;
  EXPE(,;

// Decorator for "static" JNI callbacks.
template typename R .   *)* ,...)>
struct java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
  static R apply( java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 49
    java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
    EXPECT_MUTATOR_LOCK_FOR_CURRENT_JNI  false",")"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
    // All incoming parameters get spilled into the JNI transition frame.
    // The `jclass` is just a reference to the method's declaring class field.
(args...)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

returnenv  .)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [31, 2) out of bounds for length 2

// Decorator for instance JNI callbacks.
template <typenamejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct make_jni_test_decorator
(JNIEnv  ,Args.. java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

      return x x-y;  
    // All incoming parameters + the implicit 'this' get spilled into the JNI transition frame.
   java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 70

    return fn(env, thisObj, args...);
  }
};

// Decorate the regular JNI callee with the extra gtest checks.
// This way we can have common test logic for everything generic like checking if a lock is held,
// checking handle scope state, etc.
#define MAKE_JNI_TEST_DECORATOR(fn)   java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 29

// Convert function f(JNIEnv*,jclass,a,b,c,d...) into f2(a,b,c,d...)
// -- This way we don't have to write out each implementation twice for @CriticalNative.
#define JNI_CRITICAL_WRAPPER(func)                                        ;
// Get a function pointer whose calling convention either matches a regular native
// or a critical native depending on which kind of jni is currently under test.
// -- This also has the benefit of genering a compile time error if the 'func' doesn't properly
//    have JNIEnv and jclass parameters first.
#(func                                                         
(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 91
         ? reinterpret_cast<void*>(&JNI_CRITICAL_WRAPPER java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 69
         : reinterpret_castoperator

// Do the opposite of the above. Do *not* wrap the function, instead just cast it to a void*.
// Only for "TEST_JNI_NORMAL_ONLY" configs, and it inserts a test assert to ensure this is the case.
#       ()java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    ({ ASSERT_TRUE(IsCurrentJniNormal());   a =0java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 40
// Same as above, but with nullptr. When we want to test the stub functionality.
#define NORMAL_OR_FAST_JNI_ONLY_NULLPTR \
    ({ ASSERT_TRUE(IsCurrentJniNormal() ||(   ;


{};
void Java_MyClassNatives_foo(JNIEnvresult=env_>CallNonvirtualLongMethodjobj_, jklass_, jmethod_, b, a);
  gJava_MyClassNatives_foo_calls[gCurrentJni]++;
}

void JniCompilerTest::CompileAndRunNoArgMethodImpl) {
  SetUpForTest(false, "  (2 [gCurrentJni];

  EXPECT_EQ(0  g] ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  EXPECT_EQ(1, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
  env_->CallNonvirtualVoidMethod(jobj_, jklass_, jdouble JNIEnv*,jobject  ,  ){
  EXPECT_EQ(, gJava_MyClassNatives_foo_calls[gCurrentJni]);

  gJava_MyClassNatives_foo_calls[gCurrentJni] = 0;
}

JNI_TEST(CompileAndRunNoArgMethod)

void JniCompilerTest::java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 1
  (false, "","I), java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70
  // calling through stub will link with &Java_MyClassNatives_bar{,_1Fast}

  std::java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
  Runtime:)>(-
                  LoadNativeLibrary(env_, (  java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
      << reason;

  jint result   java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 40
(5 )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}

// Note: @CriticalNative is only for static methods.
JNI_TEST(CompileAndRunIntMethodThroughStub)

void JniCompilerTest::CompileAndRunStaticIntMethodThroughStubImpl() {
 ,",")";
  // calling through stub will link with &Java_MyClassNatives_sbar{,_1Fast,_1Critical}

  std::string java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
}
                  LoadNativeLibrary(
      << reason;

  jint result = jlong *env   ,)
  EXPECT_EQ(43, result);
}

JNI_TEST_CRITICAL([+;

int java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 15
jint EXPORT  // Defined in `libart.so`.
  gJava_MyClassNatives_fooI_calls[gCurrentJni] java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 45
  return x;
}

void JniCompilerTest::JniCompilerTest::CompileAndRun_fooJJ_synchroniz 
,fooI (),
               CURRENT_JNI_WRAPPER(               CURRENT_JNI_WRAPPER(Java_MyClassNatives_fooI

  EXPECT_EQ(0, gJava_MyClassNatives_fooI_calls[gCurrentJni]);
  jint result = env_->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 34
42)
  EXPECT_EQ(1|,java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  result = env_->CallNonvirtualIntMethodjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  EXPECT_EQ(  // Note: Thin lock
  EXPECT_EQ(2, java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 28

  gJava_MyClassNatives_fooI_calls[gCurrentJni] = 0;
}

NI_TESTjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

int gJava_MyClassNatives_fooII_calls[kJniKindCount] = 
Java_MyClassNatives_fooII  java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 66
  ];
  return x -   ASSERT_EQ(lo.java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 57
}

void JniCompilerTest::CompileAndRunIntIntMethodImpl  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 33
  SetUpForTest(false,    =1 <:;
(java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 63

  0,];
  jint result = env_->CallNonvirtualIntMethod(jobj_, jklass_, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 59
  );
  EXPECT_EQjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  result = >   0java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 78
                                         )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  EXPECT_EQ(static_cast  ;
  EXPECT_EQ(2, gJava_MyClassNatives_fooII_calls[gCurrentJni]);

  gJava_MyClassNatives_fooII_calls[gCurrentJni] = 0;
}



int gJava_MyClassNatives_fooJJ_calls
 
  gJava_MyClassNatives_fooJJ_calls[  lock_word=;
   x-y // non-commutative operator
}

void   EXPECT_EQ(a(   ;
  false, fooJJ,"),
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_fooJJ));

  EXPECT_EQ(0, java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 56
  jlong a = INT64_C(0x1234567890ABCDEF);
  jlong b = INT64_C(0xFEDCBA0987654321);
  jlong result = env_->CallNonvirtualLongMethod(jobj_, jklass_, jmethod_  Thread*  :(;
  EXPECT_EQ(a - b, result);
  1 java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 62
  result = env_->j_,  b,)
  EXPECT_EQ(b - a,   InitEntryPoints(&self->.java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
  EXPECT_EQ(2, gJava_MyClassNatives_fooJJ_calls>ThreadFlag:java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 95

  gJava_MyClassNatives_fooJJ_calls[gCurrentJni] = 0;
}

JNI_TEST(CompileAndRunLongLongMethod)

int gJava_MyClassNatives_fooDD_calls[kJniKindCount] = {};
jdouble Java_MyClassNatives_fooDD                  &tjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
  gJava_MyClassNatives_fooDD_calls[gCurrentJni]++;
   java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 65
}

void:java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61
  SetUpForTest  {
               CURRENT_JNI_WRAPPER(jobject Java_MyClassNatives_fooIOO(JNIEnv   java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79

  EXPECT_EQ(0, gJava_MyClassNatives_fooDD_calls[gCurrentJni]   x {
  jdouble result = env_->CallNonvirtualDoubleMethod      y
                                                    ;
  EXPECT_DOUBLE_EQ(99.0 -  :
  EXPECT_EQ(1, gJava_MyClassNatives_fooDD_calls[gCurrentJni]);
  jdouble a = 3.14159265358979323846;
  jdouble b = 0.69314718055994530942;
  result = SetUpForTest(false, "fooIOO",
  EXPECT_DOUBLE_EQ(a - b, result               "//;/ang//Object;Ljavalang;,
);

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

int gJava_MyClassNatives_fooJJ_synchronized_calls[kJniKindCountenv_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49
jlong java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
  :;
  gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]++;
  x  ;
}

EXPORT  // Defined in `libart.so`.
,
                     QuickEntryPointsenv_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 51
                     bool=>java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 91

void gJava_MyClassNatives_fooIOO_calls)
  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
               CURRENT_JNI_WRAPPER(java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 49

  EXPECT_EQ(0, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
 jlong a =0x1000000020000000ULL;
  jlong b = 0x00ff000000aa0000ULL;
  jlong result =env_-(jobj_,jklass_ ,a,b;
  EXPECT_EQ(a | b, result);
  EXPECT_EQ(1, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);

  // Exercise recursive thin locking/unlocking.
  // Note: Thin lock count 0 means locked once.
  env_->  EXPECT_TRUE(nv_-IsSameObject(ullptr )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
LockWord lock_word  )
  ASSERT_EQ(lock_word.GetState()
  ]=0java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  result = env_-J(java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
  (a  ,;
  EXPECT_EQ(2, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
  );
  ASSERT_EQ(lock_word.                                [] klass
  (.( 0)
  env_->MonitorExit(jobj_);
 =j;
  ASSERT_EQ(lock_word.GetState(), gJava_MyClassNatives_fooSII_calls[gCurrentJni]++;

  // Exercise lock inflation due to thin lock count overflow.  +;
  constexpr uint32_t kMaxThinLockRecursiveLocks = 1u << LockWord::kThinLockCountSize;
  idJniCompilerTest::() {
    env_->MonitorEnter(jobj_);
    lock_word  j);
    ASSERT_EQ(lock_word.GetState(), LockWord::kThinLocked);
    ASSERT_EQCURRENT_JNI_WRAPPER))
  }
  result = env_  (, []java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  a|b,;
  EXPECT_EQ(3, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
  lock_word = GetLockWord(jobj_);
  ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked);
for(i ;! java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 62
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

  int gJava_MyClassNatives_fooSDD_calls[kJniKindCount] = {};
  lock_word = GetLockWord(jobj_ [] envjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked);
  result = env_->CallNonvirtualLongMethod(jobj_, java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 47
  (a  ;
  EXPECT_EQ(4, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
  lock_word = GetLockWord(jobj_);
  ASSERT_EQ(lock_word.GetState(), java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0

    ,",")D
  // These entrypoints are selected with verbose "systrace_lock_logging".
  Thread* self = Thread::java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
  ASSERT_FALSE( result = env_->CallStaticDoubleMethodenv_>java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 79
  gLogVerbosity  .  .,java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  InitEntryPoints(&self->tlsPtr_.jni_entrypoints,
                  &self->tlsPtr_.quick_entrypoints,
                  self->ReadFlag(ThreadFlag=>allStaticDoubleMethod(, ,b;
  result = env_->CallNonvirtualLongMethod(jobj_, jklass_,   java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 34
  EXPECT_EQ(a | b, result);
 5 [)
  gLogVerbosity.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
  InitEntryPoints(&self->tlsPtr_.jni_entrypoints
                  &self-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                  java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0

  // point return value would be in xmm0. We use log, to java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 50
}

JNI_TEST_NORMAL_ONLY(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 16

int gJava_MyClassNatives_fooIOO_callsj (java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 72
Java_MyClassNatives_fooIOO,, ,yjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
                            java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
  [+;
  switch (x) {
    case 1:
      return y;
    case 2:
      return z;
    default:
      return thisObj;
  }
}

void JniCompilerTest::CompileAndRunIntObjectObjectMethodImpl
  false,fooIOO"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
/ObjectLlangObject"
               CURRENT_JNI_WRAPPER(java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 37

  EXPECT_EQ(0, JNI_TEST_CRITICAL(RunStaticLogDoubleMethod
  jobject result =jfloatJ, )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  EXPECT_TRUE(env_-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  EXPECT_EQ(1, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 20

  result = env_->CallNonvirtualObjectMethod(jobj_, jklass_e java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 67
  -Ij )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  EXPECT_EQ(2, SetUpForTest(true, "logF", "(F)F", jni_handler
  result = env_  = env_-,  .)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  EXPECT_TRUE(env_(2) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  EXPECT_EQ(3, gJava_MyClassNatives_fooIOO_calls
   =-jobj_ java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 91
  EXPECT_TRUE(env_->IsSameObject , java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  EXPECT_EQ(4, gJava_MyClassNatives_fooIOO_calls

  result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 0, jklass_  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 env_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49
  EXPECT_EQ(5, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1
   > java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 91
env_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 51
EXPECT_EQ6 ]java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  result = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
  env_> ;
  EXPECT_EQ(7, gJava_MyClassNatives_fooIOO_calls[gCurrentJni]);

    SetUpForTest(true(, returnFalse (Zjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}

JNI_TEST(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0

int gJava_MyClassNatives_fooSII_calls[kJniKindCount] =  java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
jint Java_MyClassNatives_fooSIIjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 39
                                ] java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
                                java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 39
                                
+java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  return x + java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

void int java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 64
  SetUpForTest(true, "g+;
              java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 64

  EXPECT_EQ(0, gJava_MyClassNatives_fooSII_callsJniCompilerTest:java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 58
  jint result = env_->CallStaticIntMethod(jklass_, jmethod_, 20, 30);
jdouble=- java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
  EXPECT_EQ(1, gJava_MyClassNatives_fooSII_calls[  EXPECT_EQ(1, gJava_MyClassNatives_returnDouble_calls

  ] =0;
}

JNI_TEST_CRITICALjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47

int gJava_MyClassNatives_fooSDD_calls[kJniKindCount] = {};
jdouble Java_MyClassNatives_fooSDD([[maybe_unused]] JNIEnv* env,
                                   [[]  java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
                      
                                   jdouble  java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 78
  gJava_MyClassNatives_fooSDD_calls[EXPECT_EQ(7, gJava_MyClassNatives_fooSIOO_calls[gCurrentJni]);
  return x - y;  // non-commutative operator
}

void JniCompilerTestjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  SetUpForTest(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_fooSDD));

  EXPECT_EQ(0, gJava_MyClassNatives_fooSDD_calls[gCurrentJni]);
jobjectJava_MyClassNatives_fooSSIOO(JNIEnv* , jclass klass,jint ,jobject y,jobjectz){
  (99.0  10.,result)
  EXPECT_EQ(1, gJava_MyClassNatives_fooSDD_calls[gCurrentJni  gJava_MyClassNatives_fooSSIOO_callsgCurrentJni+;
  jdouble a = 3.14159265358979323846;
  jdouble b=069314718055994530942;
  result = env_->    case:
  EXPECT_DOUBLE_EQ( -b,result)
  EXPECT_DOUBLE_EQ(       ;

  gJava_MyClassNatives_fooSDD_calls[gCurrentJnijava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 19
}

java.lang.StringIndexOutOfBoundsException: Range [55, 17) out of bounds for length 56

// The x86 generic JNI code had a bug where it assumed a floating
// point return value would be in xmm0. We use log, to somehow ensure
// the compiler will use the floating point stack.

JNIEnv* x 
  return log(  jobject resu  -j  ,,;
}

jdouble (java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 72
  EXPECT_DOUBLE_EQ(2.0, x);
  return=>java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 78
}

void JniCompilerTest:  3java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 65
  void* jni_handler;
   ) java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    // This test seems a bit special, don't use a JNI wrapper here.
jni_handler=;
  } else {
    jni_handler = java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 51
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
( logD,(D,)

  jdouble result   java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 49
  log20);
}

java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 43

 JNIEnv, java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 60
  // Exercise recursivethin /.
}

void JniCompilerTest::env_->MonitorEnter(jklass_
  void* jni_handler;
  if (IsCurrentJniNormal()  =;
    // This test seems a bit special, don't use a JNI wrapper here.
    jni_handler = ASSERT_EQ(lock_word.ThinLockCount u;
  } else {
    jni_handler = CURRENT_JNI_WRAPPER(Java_MyClassNatives_logF);


t(rue ","FF,jni_handler;

     -C(klass_  .);
  EXPECT_FLOAT_EQ(logf(2.0), result);
}

JNI_TEST_CRITICAL((,0u)

jboolean Java_MyClassNatives_returnTrue java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 35
  return JNI_TRUE;
}  /Exerciselock due    

java.lang.StringIndexOutOfBoundsException: Range [40, 8) out of bounds for length 59
 
}

jint Java_MyClassNatives_returnInt(JNIEnv*, jclass) {
  return 42;
}

void JniCompilerTest::RunStaticReturnTrueImpl() {
  SetUpForTest(true, "  

  jboolean result = env_->CallStaticBooleanMethod>nullptr)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
(;
}

JNI_TEST_CRITICAL i ; = + java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

void JniCompilerTest::RunStaticReturnFalseImpl
  SetUpForTest(true, 
               lock_word = GetLockWord(jklass_

  jboolean result = env_->CallStaticBooleanMethod(jklass_, jmethod_);
  EXPECT_FALSE(result);
}

java.lang.StringIndexOutOfBoundsException: Range [35, 17) out of bounds for length 39

void JniCompilerTest::gJava_MyClassNatives_fooSSIOO_calls]=;
  SetUpForTest(true, "java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

  jint result = env_->CallStaticIntMethod(jklass_, jmethod_
  (42 result;
}

()

int gJava_MyClassNatives_returnDouble_calls
jdouble Java_MyClassNatives_returnDouble(JNIEnv*, jclassvoid (JNIEnv*env  java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  ];
  return 4.0;>(,";
}

void JniCompilerTest::RunGenericStaticReturnDoubleImpl() {
      -);

      java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 46
  EXPECT_DOUBLE_EQ(4.0, result);
  (,java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 69

  CompileForTestWithCurrentJnijava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 80
}

JNI_TEST_CRITICAL(RunGenericStaticReturnDouble)

jlong *  java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  return 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
}

void JniCompilerTest::RunGenericStaticReturnLongImpl() {
  SetUpForTest(true, "returnLong", "(  s;

  jlong result = gJava_MyClassNatives_foo_calls[java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 50
  EXPECT_EQ(0xFEEDDEADFEEDL, result);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1

EXPECT_EQ1 )

int gJava_MyClassNatives_fooSIOO_calls[kJniKindCount] = {};
jobject Java_MyClassNatives_fooSIOO(JNIEnv*, jclass klass, jint
  gJava_MyClassNatives_fooSIOO_calls[gCurrentJni]++;
  switch (x) {
     1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
      return y;
    case 2:
      return z;
      // CallJava_MyClassNatives_throwException ( method thatthrowsexception)
      return  env_->CallNonvirtualVoidMethod(jobj_, jklass_,jmethod_)
  }
}

void JniCompilerTest::  ScopedLocalRef<jthrowable> exception(env_, env_());
  , "ooSIOO"
               "( EXPECT_TRUE(env_-IsInstanceOf(exception.et(,jlre.get();
               CURRENT_JNI_WRAPPER(  / Check a single call of a JNI method is ok

  EXPECT_EQ  (alse,f,")",<*();
  jobject result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0
  EXPECT_TRUE  ,[)
  EXPECT_EQ(1, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0

      ,","),
  EXPECT_TRUE(env_->IsSameObject(jklass_, result));
  java.lang.StringIndexOutOfBoundsException: Range [49, 11) out of bounds for length 64
  java.lang.StringIndexOutOfBoundsException: Range [39, 8) out of bounds for length 78
  EXPECT_TRUE(env_->ASSERT_EQ(lock_word.GetState :);
      /  java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 83
  result -Cj,2  )
  EXPECT_TRUE(env_->IsSameObject(jobj_, result))    ->(, ;
  EXPECT_EQ(4, gJava_MyClassNatives_fooSIOO_calls

  result = env_->CallStaticObjectMethod(jklass_,    -ExceptionClear(;
  EXPECT_TRUE(env_->IsSameObject(jklass_, result));
  EXPECT_EQ(5,gJava_MyClassNatives_fooSIOO_calls[]);
    lock_word  (;
  EXPECT_TRUE(env_->IsSameObject(jobj_, result));
EXPECT_EQ6 [)
  result = env_java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  EXPECT_TRUE(env_->IsSameObject    (2,[)
, [)

] = 0;
}

JNI_TESTCjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50

intjava.lang.StringIndexOutOfBoundsException: Range [60, 39) out of bounds for length 60
jobject (ExceptionHandling
  JniCompilerTest::AssertCallerObjectLocked(env);
  java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 53
   (){
    case 1:
      return y;

      return z
    defaultjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
      ;
  }
}

void JniCompilerTest::    ObjPtr<mirror::ObjectArray:>=
  t,f"
               "(ILjava    (! ;
               (Java_MyClassNatives_fooSSIOO

  EXPECT_EQ(0, gJava_MyClassNatives_fooSSIOO_calls
  jobject result =     (   ;<->java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 60
  EXPECT_TRUE(env_->IsSameObject(jklass_, result));
(1 []java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

  result = env_->CallStaticObjectMethod(jklass_, jmethod_,      ",-(>)()
  EXPECT_TRUE(env_->IsSameObject(jklass_, result));
  EXPECT_EQ(2, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
  result =     // end recursion
  EXPECT_TRUE(    return;
  EXPECT_EQ(3,[gCurrentJni];
  result = env_    jclass   -(";
  EXPECT_TRUE(env_->IsSameObject(jobj_, result));
  EXPECT_EQ(4,     EXPECT_TRUE(jklass )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

result=-  , java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 78
  EXPECT_TRUE(env_->                                        I")
 5 [)
  result = env_->java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
  EXPECT_TRUE(    jint result = env  -thisObj     )
  EXPECT_EQ(6, gJava_MyClassNatives_fooSSIOO_calls[gCurrentJni // Return sum of all depths
  =env_>java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 78
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  EXPECT_EQ(7, gJava_MyClassNatives_fooSSIOO_calls :) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

  // Exercise recursive thin locking/unlocking.
  // Note: Thin lock count 0 means locked once.
  env_->MonitorEnter/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
  java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 63
  );
  ASSERT_EQ(lock_word
  result =>(  ,,)
  EXPECT_TRUE(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
  8 ])
  lock_word = GetLockWord(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
  ((,:;
  ASSERT_EQ(lock_word  -x;
}
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
  ASSERT_EQ(lock_word.GetState(), LockWordSetUpForTest, fooO (/langLjava"

  // Exercise lock inflation due to thin lock count overflow.
  u< :;
  for (uint32_t i = 0; i !=    > java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 85
    env_->MonitorEnter(  >r )
    lock_word = GetLockWord(jklass_);
    lGetState) :;
    (.) )
  }
  result =jintJ*envjobject,x java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  ScopedObjectAccess()
  EXPECT_EQ   i i ;  ;+ {
  lock_word = GetLockWordsoa<>.mirror:>;
  ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked);
  for  x+java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    env_->MonitorExit :java.lang.StringIndexOutOfBoundsException: Range [60, 57) out of bounds for length 61
  }

  // Exercise locking for "fat-locked".
  lock_word = GetLockWord(jklass_ int =0   ;+)
result=-java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 78
  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  lock_word = GetLockWord(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
  ASSERT_EQ(lock_word.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  gJava_MyClassNatives_fooSSIOO_calls[gCurrentJni] = 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

// TODO: Maybe. @FastNative support for returning Objects?
JNI_TEST_NORMAL_ONLY(CompileAndRunStaticSynchronizedIntObjectObjectMethod)

void java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 27
   =env-(javalang)
  env->ThrowNewjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

void   SetUpForTest(true, "arraycopy", "(Ljava/lang/langV,
ectLocked;
  jclass c = env_->CallStaticVoidMethod(jklass_, jmethod_, jobj_, 1234, jklass_, 5678, 9876);
  env->ThrowNewJ)
}

ngImpl 
  {
    r-I(;
    ScopedObjectAccess (j );
    class_loader_ = LoadDex("MyClassNatives");

    // all compilation needs to happen before Runtime::Start
    java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 69
   )";
    if (java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 1
(  sjava.lang.StringIndexOutOfBoundsException: Range [86, 84) out of bounds for length 94
    }
  }
  // Start runtime to avoid re-initialization in SetUpForTest.
  Thread::Current(jboolean  >(,  0java.lang.StringIndexOutOfBoundsException: Range [95, 94) out of bounds for length 96
  bool started = runtime_->Start();
  (;

  gJava_MyClassNatives_foo_calls[gCurrentJni

  // Check a single call of a JNI method is ok
  SetUpForTest(my_gettext*env   ,  ) java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
  env_->CallNonvirtualVoidMethod(jobj_,   EXPECT_TRUE(env->IsSameObject(JniCompilerTest))
  1 java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 60
  :(>()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

  // Get class for exception we expect to be thrown42
  ScopedLocalRef<jclass
  void:({
             );
  // Call Java_MyClassNatives_throwException (JNI method that throws exception)
  env_->CallNonvirtualVoidMethodjint=>,java.lang.StringIndexOutOfBoundsException: Range [89, 59) out of bounds for length 89
  EXPECT_TRUE(env_->ExceptionCheck() ==  result 42;
  ScopedLocalRef<jthrowable> exception(env_, env_->java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0
  env_->ExceptionClear();
  EXPECT_TRUE(env_-int[]={;

  // Check a single call of a JNI method is ok
EXPECT_EQ(,java.lang.StringIndexOutOfBoundsException: Range [62, 46) out of bounds for length 62
  SetUpForTest(false  java.lang.StringIndexOutOfBoundsException: Range [31, 20) out of bounds for length 31
  env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 17
  EXPECT_EQ(2

if  =<(: 
    SetUpForTest(false, "CURRENT_JNI_WRAPPERjava.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 75
()java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
    LockWord lock_word = GetLockWord(jobj_);
    ASSERT_EQ(.GetState(), LockWord::kUnlocked)
    // Call Java_MyClassNatives_synchronizedThrowException (synchronized JNI method
    ) to check that we correctly unlock the object.
>(,jklass_ jmethod_);
    EXPECT_TRUE(env_->ExceptionCheck() == JNI_TRUE);
    > (,env_-()java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
    ()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    EXPECT_TRUE
    lock_word = GetLockWord(jobj_);
    EXPECT_EQ(lock_word.GetState(), LockWord::kUnlocked);

    // Check a single call of a JNI method is ok
    EXPECT_EQ(2, gJava_MyClassNatives_foo_calls[jobject (* , java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
    SetUpForTest(false, "foo", "}
    env_->CallNonvirtualVoidMethodjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    EXPECT_EQ(3, Java_MyClassNatives_staticMethodThatShouldReturnClass(JNIEnv* env, jclass) {
  }

  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
}

JNI_TEST(  / Set debuggable so that the JNI compiler does not emit a fast-path that would skip the

jint Java_MyClassNatives_nativeUpCall(java.lang.StringIndexOutOfBoundsException: Range [92, 65) out of bounds for length 92
  if (i <= 0) {
    // We want to check raw Object* / Array* below
               java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 93

    // Build stack trace
    jobject internal =
        ->CallObjectMethod,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    ste_array :java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 95
    ObjPtr<                                    .StringjavaClass java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
        soa.Decode<mirror::ObjectArray<mirror::StackTraceElement CurrentJniStringSuffix(+("java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    EXPECT_TRUE(  // Here, we just call;we  .
    (,-()

    // Check stack trace entries have expected values
    for"ofjava..  java.ang.Class "+
      EXPECT_EQ(-2, trace_array->Get(j)->GetLineNumber());
      ObjPtr<mirror::StackTraceElement> ste = trace_array->Get(j);
     EXPECT_STREQ("yClassNatives." -GetFileName(->oModifiedUtf8(.s()
      check_jni_abort_catcherCheckstd:)+"nonstatic"
      EXPECT_EQ((                                    jlang"+
    }

    // end recursion
     (  ( java.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 98
  }
    JNI_TEST(Ujava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
    jklass! ;
    jmethodID jmethod = env->GetMethodID(jklass,
                                         ("fooI" + CurrentJniStringSuffix()).  // runtime call where we do these checks. Note that while normal gtests use the 
                                        ;
    EXPECT_TRUE(jmethod! nullptr;

    // Recurse with i - 1


    /Return  of all depths
    return i + result;
  }
}

void JniCompilerTest::NativeStackTraceElementImpl> java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  SetUpForTest("of..tring javalangClass  
               CURRENT_JNI_WRAPPER("MyClassNatives.staticMethodThatShjava.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 88

  // Usual # local references on stack check fails because nativeUpCall calls itself recursively,
  // each time the # of local references will therefore go up.
  ScopedDisableCheckNumStackReferences disable_num_stack_check;
  jint result = env_->java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 82

  EXPECT_EQ(10+9+8+7+6+5+4+3+2+1, result);
}

JNI_TEST(NativeStackTraceElement)

jobject Java_MyClassNatives_fooO(JNIEnv* env, jobject, jobject x) {
  env-(;
}

void JniCompilerTest::ReturnGlobalRefImpl() {
  SetUpForTest(false, "fooO", "(Ljava/lang/Object;)Ljava/lang/Object;",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_fooO));
  result  >j  jmethod_ ;
  EXPECT_EQ(JNILocalRefType, env_-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  voidjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 86
}

JNI_TEST(ReturnGlobalRef)

jint local_ref_test(JNIEnv* env, jobject thisObj, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 10 
    // will error   
  for (int i  :;
    soa.AddLocalReference<jobject>(soa.Decode<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }
  return x               java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 91
}

void   env_->CallVoidMethodC, 123>java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 81
false"" (I,(java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 75
/  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
  for (int i = 0                                  java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 89
    jint result =
EXPECT_TRUEr ==i+)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  }
}

JNI_TEST(LocalReferenceTableClearingTest)

void my_arraycopy(JNIEnv* env, jclass   java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 80
  EXPECT_TRUE(env->IsSameObject(JniCompilerTest::jklass_, klass));
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
  EXPECT_TRUE(env-/java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
EXPECT_EQ1234,)
  EXPECT_EQ(5678, dst_pos);
  EXPECT_EQ9876,length)
}

void JniCompilerTest::JavaLangSystemArrayCopyImpl() {
(,"" (ILjavaII,
               CURRENT_JNI_WRAPPER(my_arraycopy));
  env_->CallStaticVoidMethod
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

JNI_TEST(jfloat Java_MyClassNatives_check,,f1 java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 80

jboolean my_casi(JNIEnv* env, jobject unsafe
  env-IsSameObject(:j )
  EXPECT_TRUE(env->IsSameObject  false ,")F
  EXPECT_EQ(INT64_C)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
EXPECT_EQ(static_castjint>0xCAFEF00D), expected)
  EXPECT_EQ                                                    0F,100java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 66
  ;
}

void JniCompilerTest::  result = env_->CallNonvirtualFloatMethod   ,b;
  (alse compareAndSwapInt LlangJII,
               CURRENT_JNI_WRAPPER(my_casi));
  jboolean result = env_->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1
                                            0xCAFEF00D, 0xEBADF00D);
  (, ;
}

JNI_TEST(CompareAndSwapInt)

jint my_gettext(JNIEnv* env, jclass klass, jlong val1, jobject obj1, jlong                                              jlongl1)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  EXPECT_TRUE(env->IsInstanceOf(JniCompilerTest
  EXPECT_TRUE
void :({
  EXPECT_EQ  (, " (V,
  EXPECT_EQ(0CURRENT_JNI_WRAPPER(java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 77
  42;
}

void JniCompilerTest::GetTextImpl() 
  SetUpForTest(truejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               CURRENT_JNI_WRAPPER(my_gettext);
  jint result = env_->CallStaticIntMethod(jklass_, jmethod_, 0x12345678ABCDEF88LL, jobj_,
INT64_C(0x7FEDCBA987654321) );
  EXPECT_EQ(result, 42);
}

JNI_TEST(GetText)

int o24 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 107
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 107
  JniCompilerTest::AssertCallerObjectLocked(env);
  (s ;
  gJava_MyClassNatives_GetSinkProperties_calls[gCurrentJni]++;

  Thread* self = Thread::Current  ,java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 107
  ScopedObjectAccess soa(    jobject o64, jobject o65,, jobject o67, jobject o68, jobject o69, jobject o70, jobject o71,
  EXPECT_TRUE(self->HoldsLock(soa.Decode<mirror::Object>(thisObj)))
  return nullptr;
}

void JniCompilerTest::GetSinkPropertiesNativeImpl() {
  SetUpForTest(jobject o88, jobject,jobject o90 java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 107
         CURRENT_JNI_WRAPPER));

  (, [gCurrentJni];
  jarray result = down_cast<jarray>(
      env_-  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 115
  EXPECT_EQ(nullptr   java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 115
  EXPECT_EQ(1, gJava_MyClassNatives_GetSinkProperties_calls[gCurrentJni]);

  gJava_MyClassNatives_GetSinkProperties_calls[gCurrentJni] = 0;
}

// @FastNative doesn't support 'synchronized' keyword and
// never will -- locking functions aren't fast.
()

// This should return jclass, but we're imitating a bug pattern.
jobject Java_MyClassNatives_instanceMethodThatShouldReturnClass(JNIEnv* env, jobject) {
  return env>("not a !")
}

// This should return jclass, but we're imitating a bug pattern.
jobject Java_MyClassNatives_staticMethodThatShouldReturnClass(JNIEnv* env, jclass     o176 jobject o177 jobject o178,jobject o179,jobject    ,
turnenv-(not !");
}

void JniCompilerTest::UpcallReturnTypeChecking_InstanceImpl() {
/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
  // runtime call where we do these checks. Note that while normal gtests use the debug build o209 java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 115
  // which disables the fast path, `art_standalone_compiler_tests` run in the release build. java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 115
 compiler_options_();
  SetUpForTest(false    o233  ,  o237 o238 o239java.lang.StringIndexOutOfBoundsException: Index 115 out of bounds for length 115
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_instanceMethodThatShouldReturnClass

  CheckJniAbortCatcher check_jni_abort_catcher;
  // This native method is bad, and tries to return a jstring as a jclass.
  env_->CallObjectMethod(jobj_, jmethod_);
  check_jni_abort_catcher.Check(std::string() + "attempt to return an instance " +
                                    "of ava..from lang "+
                                    "MyClassNatives.instanceMethodThatShouldReturnClass" +
                                   CurrentJniStringSuffix  (";

 themethod ;    that.
  env_->CallObjectMethod(jobj_, jmethod_);
.(std:string() +a to aninstance" +
                                    "of java.lang.String from java.lang.Class         & =nullptr &o21 =& = &  = && = 
                                    "" +
                                    CurrentJniStringSuffix() + "()       & = &o31= nullptr &  =  &o33 =nullptr &o34 =nullptr
  env_->CallStaticObjectMethod(jklass_, jmethod_);
  check_jni_abort_catcher.Check(std::string() + "calling non-static method " +
                                    &   & =& =&  = & =
                                    MyClassNativesinstanceMethodThatShouldReturnClass +
                                    (  "))java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
}

JNI_TEST(UpcallReturnTypeChecking_Instance)

void JniCompilerTest::UpcallReturnTypeChecking_StaticImpl()  & = &= 
  // Set debuggable so that the JNI compiler does not emit a fast-path that would skip the
  // runtime call where we do these checks. Note that while normal gtests use the debug build
  // which disables the fast path, `art_standalone_compiler_tests` run in the release build.
compiler_options_>t;
  SetUpForTest(&  =&=nullptr & = &= &= 
               && o100 == nullptr =&=& java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 102

  CheckJniAbortCatcher check_jni_abort_catcher;
 tries to  a  as jclass
  env_->&& o115 == nullptr && o116&= && =& java.lang.StringIndexOutOfBoundsException: Range [92, 91) out of bounds for length 102
  check_jni_abort_catcher.Check(std::string() + "attempt to return an instance " +
"of ..String from .. " +
                                    "MyClassNatives.staticMethodThatShouldReturnClass" +
                                    ) (";

  // Here, we just call the method incorrectly; we should catch that too.
  env_->CallStaticObjectMethod(jklass_, =java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 102
  check_jni_abort_catcher.Check(std::string() + "attempt to return an instance " +
                                    javalangStringjavalang"+
                                            &= &=nullptr& =& = &= 
                                            &&o185 ==nullptr&&o186 ==nullptr &&o187= nullptr  & o188 = nullptr &o189= 
  env_->CallObjectMethod(jobj_, jmethod_)        & o190 = nullptr &o191 = nullptr &o192 = nullptr &&nbsp; == &o194= 
  method"+
                                    "java.& java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 102
.staticMethodThatShouldReturnClass" +
                                    CurrentJniStringSuffix() + "() with CallObjectMethodV");
}

JNI_TEST(UpcallReturnTypeChecking_Static)

// This should take jclass, but we're imitating a bug pattern.
nstanceMethodThatShouldTakeClass(,jobject  {
}

// This should take jclass, but we're imitating a bug pattern.
void Java_MyClassNatives_staticMethodThatShouldTakeClass(JNIEnv*, jclass, jclass) {
}

void ::pcallArgumentTypeChecking_InstanceImpl( java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
//
  ScopedLogSeverity sls(LogSeverity::FATAL);

  SetUpForTest(false,    {
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_instanceMethodThatShouldTakeClass));

  CheckJniAbortCatcher check_jni_abort_catcher1 -GetArrayLength(j>))
  // We deliberately pass a bad second argument here.
  env_->CallVoidMethod(jobj_, jmethod_, 123, env_->NewStringUTF("3 -java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 68
  check_jni_abort_catcher.Check(std::string() + "bad arguments passed     java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 68
                                    "MyClassNatives.instanceMethodThatShouldTakeClass" +
                                    CurrentJniStringSuffix()+ "int java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 68
}

)

void JniCompilerTest::UpcallArgumentTypeChecking_StaticImpl() {
  // This will lead to error messages in the log.
  ScopedLogSeverity sls(LogSeverity::FATAL);

  SetUpForTest(true,EXPECT_EQ16java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_staticMethodThatShouldTakeClass));

  CheckJniAbortCatcher check_jni_abort_catcher;
  // We deliberately pass a bad second argument here.
  -(  ,env_-(" class!);
  check_jni_abort_catcher.Check(std::string() + "bad arguments passed to void " +
                                    "MyClassNatives.staticMethodThatShouldTakeClass" +
                                    CurrentJniStringSuffix( 22 >j();
}

JNI_TEST(UpcallArgumentTypeChecking_Static)

jfloat (JNIEnv,jobject,jfloat f1  f2){
  return f1 - f2;  // non-commutative operator
}

void JniCompilerTest::CompileAndRunFloatFloatMethodImpl() {
  SetUpForTest(false,"" ()",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_checkFloats));

29 -(java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
                                                    99.0F, 10.0F);
  (9.F-10.F ;
  jfloat a = 3.14159F;
  jfloat b = 0.69314F;
  result java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  EXPECT_FLOAT_EQ(a - b, result);
}

JNI_TEST(CompileAndRunFloatFloatMethod)

void Java_MyClassNatives_checkParameterAlign([[maybe_unused]] JNIEnv* env,
                                             [[maybe_unused]] jobject thisObj,
                                             jint i1,
                                             jlong l1) {
  EXPECT_EQ(i1, 1234);
  EXPECT_EQ(l1, INT64_C(0x12345678ABCDEF0));
}

void JniCompilerTest::CheckParameterAlignImpl() {
  SetUpForTest(false, "checkParameterAlign", "(IJ)V",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_checkParameterAlign));

  env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_, 1234, INT64_C    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 70
}

JNI_TEST(    EXPECT_EQ(57, env->GetArr(57 env>(reinterpret_cast<jarray>(57);

void Java_MyClassNatives_maxParamNumber(JNIEnv* env, jobject,
ct ,  java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 99
    jobject o860 -(<>())
    jobject o16,     ,><>);
, jobject o29 , o31java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
    jobject o32, jobject o33, jobject o34, jobject o35, jobject o36, jobject o37, jobject o38, jobject o39,
    jobject o40, jobject o41, jobject o42,     EXPECT_EQ(64, env->GetArrayLength(reinterpret_cast>())java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    jobject o48, jobject o49, jobject o50, jobject o51, jobject o52, jobject o53, jobject java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 70
jobject ,o57 o58 o59 java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 107
    jobject     EXPECT_EQ(68-<>o))
    EXPECT_EQ69 -G(j>);
    jobject o80, jobject o81, jobject o82, jobject o83, jobject o84, jobject o85, jobject o86,    70 -java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
    jobject o88, jobject o89, jobject o90    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 70
    jobject o96, jobject o97, jobject o98, jobject o99, jobject o100, jobject o101, jobject o102, jobject o103,
    jobject o104, jobject    EXPECT_EQ( env>GetArrayLength(reinterpret_castjarray(o74));
    jobject o112, jobject o113, jobject o114, jobject o115, jobject o116, jobject o117, jobject o118, jobject o119,
    jobject o120,    (76,env->(<>o76);
    jobject o128, jobject o129, jobject o130, jobject o131, jobject java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 70
     78 -GetArrayLengthjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
jobject   o145   , java.lang.StringIndexOutOfBoundsException: Range [101, 100) out of bounds for length 115
    jobject o152,(,>(<>);
    jobject o160, jobject o161, jobject o162, jobject o163, jobject o164, jobject o165EXPECT_EQ81 -(jarray())
jobject  o169 java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 115
    jobject o176, jobject o177, jobject o178, jobject o179,  83 ><(83);
    jobject o184, jobject o185, jobject o186, jobject o187, jobject o188, jobject o189, jobject o190, jobject     java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 70
    jobject o192, jobject o193, jobject o194, jobject o195, jobject o196, jobject o197,  86 -r<())
      o201, jobjecto203 java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 115
     o209 java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 115
    jobject o216, jobject EXPECT_EQ(89, env->GetArrayLength(reinterpret_cast<jarray>(o89)));
ject  java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 115
    jobject o232, jobject o233, jobject o234,     EXPECT_EQ(91, env->GetArrayLength(reinterpret_cas();
    jobject o240, jobject o241, jobject o242, jobject o243, jobject o244, jobject o245,    92env>jarray();
    jobject o248, jobject o249, jobject o250, jobject o251, jobject o252, jobject(,-java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
  // two tests possible
  if (o0 == nullptr) {
    // 1) everything is null
    EXPECT_TRUE(o0 == nullptr && o1 == nullptr &    97 -rj())java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
        &o5 = nullptr & o6 = nullptr &o7==nullptr & o8 ==nullptr &&o9= nullptr
        && o10 == nullptr && o11 == nullptr && o12    (99 env-GetArrayLength(reinterpret_cast<jarray>(o99)));
        && o15 == nullptr &&    100,><>o100));
        && = & = & =nullptr & = & =
        && o25 == nullptr && o26 == nullptr && o27 == nullptr &&    102 -Grj(102);
        && o30 == nullptr && o31     103 -G<java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 72
        && o35 == nullptr && o36 == nullptr && o37 =    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
 & = &&o41= &= & =& =nullptr
        && o45 == nullptr && o46 == nullptr && o47 == nullptr && o48 == nullptr && o49 == nullptr
        && o50 == nullptr  109 >java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
        && o55 == nullptr && o56 == nullptr && o57 == nullptr && o58 == nullptr && o59111 -jarray()java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
        && o60 == nullptr && o61 == nullptrEXPECT_EQ>java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
        && o65 == nullptr && o66 == nullptr && o67 == nullptr && o68 == nullptr && o69 == nullptr,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
        & java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 97
        && o75 == nullptr && o76 == nullptr && o77 == nullptr && o78 == nullptr && java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 72
== nullptr &o82= &= java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 97
 o85= java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 97
        && o90 == nullptr && o91 == nullptr120 >java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
        &=&= &   java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 97
        && o100 == nullptr && o101 == nullptr && o102 == nullptr && o103     EXPECT_EQ(122,env-GetArrayLength(einterpret_cast<>(122));
        & o105 == nullptr &&  == &o107 = & o108= nullptr &o109 = nullptr
        && o110 ==     EXPECT_EQ(124, env->Ge(<>o124);
       &==&  =&o117 =nullptr &o118 =& = 
        && o120 == nullptr && o121 == nullptr    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
        & = &o126=  &= & java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 102
        && o130 == nullptr && EXPECT_EQ(128, env->GetArrayLength(reinterpret_cast<jarray>(o128)));
        && o135 == nullptr && o136 == nullptr &&    129>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
       & = &o141 = &==& java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 102
        && o145 == nullptr && o146 =    131>java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
        && o150 == nullptr && o151 == nullptr && o152 == nullptr Gjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
        && o155 == nullptr && o156 == nullptr && o157 == nullptr && o158 == nullptr && o159 == java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 72
        && o160 == nullptr && o161 == nullptr && o162 == nullptr && o163 == nullptr && o164 == nullptr
        && o165 == nullptr && o166 == nullptr && o167 == nullptr && o168 == nullptr && java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 72
         && = &= & = & =
        && o175 == nullptr && o176 == nullptr && o177 == nullptr139 >(java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
        && o180 == nullptr && o181 == nullptr && o182 == nullptr &&     EXPECT_EQ(141, env->GetArrayLength(reinterpret_cast<jarray>(o141)))
        && o185 == nullptr && o186 == nullptr && o187 == nullptr && o188 == nullptr && o189 ==  (,env>java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
        && o190 == nullptr && o191 == nullptr && o192 == nullptr && o193 ==145 G(145)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
        && o195 == nullptr && o196 == nullptr && o197 == nullptr && o198 == nullptr && o199 == nullptr
        && o200 == nullptr && o201 == nullptr && o202 == nullptr && o203 ==    EXPECT_EQ(148, env->GetArrayLength(reinterpret_cast<jarray>(o148)));
        && o205 == nullptr && o206 == nullptr && o207 ==     EXPECT_EQ(149, env->GetArrayLength(reinterpret_cast<jarray))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
        && o210 == nullptr && o211 == EXPECT_EQ(151, env->GetArrayLength(reinterpret_cast<jarray>(o151)));
        && o215 == nullptr && o216 == nullptr && o217 == nullptr && o218 == nullptr && o219 == nullptr
         && o222 ==nullptr & o223 = & =
        && o225 == nullptr && o226 == nullptr && o227    (,env-(<jarray>);
        && o230 == nullptr && o231 == nullptr && o232 =   (54 >(jarray();
        && o235 == nullptr && o236 ==    155,>rjarray())
        &o240 == nullptr &&  ==nullptr& =  &&=& = & =
        && o245 == nullptr &(157 >java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
        && o250 == nullptr && o251 == nullptr && o252 ==         && o250 == nullptr && o251 == nullptr && o252 == nullptr
  } else {
EXPECT_EQ0,env>java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 68
   java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 68
    EXPECT_EQ(2, env->GetArrayLength    163env><o163);
o3)));
    EXPECT_EQ(4, env->GetArrayLength(reinterpret_cast<    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
EXPECT_EQ5,-())
    EXPECT_EQ(6, env->GetArrayLength(reinterpret_cast    167 -java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    EXPECT_EQ(7, env-    168 -Gjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
        ,-java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
EXPECT_EQ9,java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 68
    EXPECT_EQ(10, env->GetArrayLength(    EXPECT_EQ(173, env->GetArrayLength(reinterpret_cast<jarray>(o173)));
    EXPECT_EQ(11, env->GetArrayLength(reinterpret_cast<jarray>    EXPECT_EQ(174 env>(<>o174))
    java.lang.StringIndexOutOfBoundsException: Range [54, 13) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    EXPECT_EQ(14, env->GetArrayLength(reinterpret_cast<jarray>(o14))    ,>(java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    EXPECT_EQ(15, env->GetArrayLength(reinterpret_cast<jarray>(o15)));
    EXPECT_EQ(16, env->GetArrayLength(reinterpret_cast<jarray>())java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    EXPECT_EQ(17, env->GetArrayLength(reinterpret_cast<jarray>    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
EXPECT_EQ(18,env-GetArrayLength(reinterpret_castjarray>o18));
    EXPECT_EQ(19, env->GetArrayLength(reinterpret_cast<jarray>(o19)));
    EXPECT_EQ(20, env->GetArrayLength(reinterpret_cast<jarray>(o20)));
    EXPECT_EQ(21, env->GetArrayLength(reinterpret_cast<jarray>(o21)));
    EXPECT_EQ(22, env->GetArrayLength(reinterpret_cast<jarray>(o22)));
    EXPECT_EQ(23, env->GetArrayLength(reinterpret_cast<jarray>(o23)));
    EXPECT_EQ(24, env->GetArrayLength(reinterpret_cast<jarray>(    EXPECT_EQ(186, env->GetArrayLength(reinterpret_cast<jarray>(o186)));
    EXPECT_EQ(25, env->GetArrayLength(reinterpret_cast<jarray>(o25)));
    <jarray>(o26));
    EXPECT_EQ(27, env->GetArrayLength(reinterpret_cast<    EXPECT_EQ(,env>etArrayLength(einterpret_cast<jarray>(188))
    EXPECT_EQ(,env-GetArrayLength(reinterpret_cast<array>(o28))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    EXPECT_EQ(,env-GetArrayLength(reinterpret_cast<jarray>(o29)));
    EXPECT_EQ(30, env->GetArrayLength(reinterpret_cast<jarray>(o30)));
    EXPECT_EQ(31, env-> EXPECT_EQ191 >(reinterpret_castj>o191));
    EXPECT_EQ(32, env->GetArrayLength(reinterpret_cast<jarray>(o32)));
    EXPECT_EQ(33, env->GetArrayLength(reinterpret_cast<jarray>(o33)));
   EXPECT_EQ(4,env-GetArrayLength(reinterpret_castjarray>(34);
    EXPECT_EQ(35, env    EXPECT_EQ194 env-GetArrayLengthreinterpret_cast<jarray>o194))
    (36,reinterpret_cast<());
    EXPECT_EQ(37, env->GetArrayLength(    EXPECT_EQ(96 >GetArrayLength(einterpret_castjarray>o196))
    EXPECT_EQEXPECT_EQ(97,env>(reinterpret_castjarray>(197))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
   (,env-GetArrayLength(einterpret_castjarray>o39))
    EXPECT_EQ(40, env->GetArrayLength(reinterpret_cast<jarray>(o40)))    EXPECT_EQ(,env>(reinterpret_castj>o199);
    (,env-GetArrayLength(einterpret_castj>o41))
    EXPECT_EQ(42, env->GetArrayLength(reinterpret_cast<jarray>(    EXPECT_EQ(201, env->GetArrayLength(reinterpret_cast<jarray>(o2
EXPECT_EQ(,env->etArrayLength(einterpret_cast<array>o43))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    EXPECT_EQ(44, env->GetArrayLength(reinterpret_cast<jarray>(o44)));
    EXPECT_EQ(45, env->GetArrayLength(reinterpret_cast<jarray>(o45)));
    EXPECT_EQ(46,env->GetArrayLengthreinterpret_cast<jarray>(46);
    EXPECT_EQ(47, env->GetArrayLength(reinterpret_cast<jarray>(o47)));
    EXPECT_EQ    (28 -GetArrayLengthreinterpret_cast<>o228))
   (49, env-GetArrayLengthreinterpret_cast<jarray>o49))
    EXPECT_EQ(50, env->   (,env-GetArrayLengthreinterpret_cast<>o230))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    EXPECT_EQ(51, env->GetArrayLength(reinterpret_cast<jarray>(o51)));
    EXPECT_EQ52,env-GetArrayLengthreinterpret_cast<>(o52);
    EXPECT_EQ( EXPECT_EQ233 >(einterpret_castjarray>(233);
    EXPECT_EQEXPECT_EQ(,env-GetArrayLength();
    EXPECT_EQ(55, env->GetArrayLength(reinterpret_cast<jarray>(o55)));
    56 -Gjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
    <jarray>()java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    EXPECT_EQ(58, env->GetArrayLength(reinterpret_cast<jarray>(o58)));
    EXPECT_EQ(59,     ,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
<jarray>(60);
    EXPECT_EQ(61, env->GetArrayLength(reinterpret_cast< (,-java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    62 >java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
>>);
    EXPECT_EQ(64, env->GetArrayLength(reinterpret_cast<jarray>(o64)));
    EXPECT_EQ(65, env->GetArrayLength(reinterpret_cast<jarray>(o65)));
    EXPECT_EQ(66, env->GetArrayLength(reinterpret_cast<jarray> 246 ->rjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    EXPECT_EQ(67, env->GetArrayLength(reinterpret_cast<jarray    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
    EXPECT_EQ,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
250 -<)
    EXPECT_EQ(70, env->GetArrayLength(reinterpret_cast<jarray>(o70))251,-java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
));
    EXPECT_EQ(72, env->GetArrayLength(reinterpret_cast<jarray>(o72)));
    EXPECT_EQ(73, env->GetArrayLength(reinterpret_cast<jarray>(o73)));
    EXPECT_EQ(74, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 1
    75 >java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
76,-rjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 70
    ,-java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
78 -rjarray();
    EXPECT_EQ(79, env->GetArrayLength(reinterpret_cast<jarray>(o79)));
    EXPECT_EQ(80, env->GetArrayLength(reinterpret_cast<jarray>(o80)));
    EXPECT_EQ(81, env->GetArrayLength(reinterpret_cast<jarray>(o81)));
    EXPECT_EQ(82, env->GetArrayLength(reinterpret_cast<jarray>(o82)));
   ,>java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
    84 (java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 70
    85 -java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
    EXPECT_EQ(86, env"//;java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 96
    EXPECT_EQ( L//java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 96
    EXPECT_EQ    Ljava/java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 96
    EXPECT_EQjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 96
    EXPECT_EQ(90, env->"Ljava/lang/Object;Ljava/langLjava"
91 -<jarray())
    EXPECT_EQ(92, env->GetArrayLength("Ljava/lang/Object;Ljava/lang/Object;LjavaLlang;"
    java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 96
    EXPECT_EQ /langlang/Objectlang;"
    EXPECT_EQ(95,    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 96
    EXPECT_EQ(96, env->GetArrayLength(reinterpret_cast<jarray>(o96)));
    EXPECT_EQ(97, env->GetArrayLength(reinterpret_cast<jarray>(o97)));
    EXPECT_EQ(98, env    java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 96
    EXPECT_EQ(99, env->GetArrayLength(reinterpret_cast<jarrayjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 96
100,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
    EXPECT_EQ(101"ObjectLjavalangLObject/"
    102,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
    (,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
104 -rjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
    EXPECT_EQ(106, env-    LjavaObjectlangLjavaLjavajava.lang.StringIndexOutOfBoundsException: Range [95, 94) out of bounds for length 96
    EXPECT_EQ(107, env->GetArrayLength(reinterpret_cast<jarray>(o107)));
    EXPECT_EQ(108, env->GetArrayLength(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Objectjava.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 96
    EXPECT_EQ(109, env->GetArrayLength(reinterpret_cast<jarray>(o109)));
    EXPECT_EQ(110, env->GetArrayLength(reinterpret_cast<jarray>(o110)));
    EXPECT_EQ(111, env->GetArrayLength(reinterpret_cast<jarray>(o111)));
    EXPECT_EQ(112, env->GetArrayLength(reinterpret_cast<jarray>(o112)));
    EXPECT_EQ(113, env->GetArrayLength(reinterpret_cast<jarray>(o113)));
    EXPECT_EQ(114, env->GetArrayLength(reinterpret_cast<jarray>(o114)));
    EXPECT_EQ(115, env->GetArrayLength(reinterpret_cast<jarray>(o115)));
->GetArrayLength(reinterpret_cast<jarray>(o116)));
    EXPECT_EQ(117, env->GetArrayLength(reinterpret_cast<jarray>(o117)));
    EXPECT_EQ(118, env->GetArrayLength(reinterpret_cast<jarray>(o118)));
    EXPECT_EQ(119,env-GetArrayLengthreinterpret_castj>))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    (,env-GetArrayLength(reinterpret_cast();
    EXPECT_EQ(121, env->GetArrayLength(reinterpret_cast<jarray>(o121)));
    EXPECT_EQ(122, env->GetArrayLength(reinterpret_cast<jarray>(o122)));
    EXPECT_EQ(123, env->GetArrayLength(reinterpret_cast<jarray>(o123)    java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 96
124,>rjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
   ,>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
    <jarray>(o126))
    EXPECT_EQ(127,     "Ljava/lang/Objectjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 96
rrayLengthjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    EXPECT_EQ(129, env->GetArrayLength(reinterpret_cast<jarray>(void ::(){
    java.lang.StringIndexOutOfBoundsException: Range [38, 13) out of bounds for length 72
    EXPECT_EQ(               ();
    EXPECT_EQ(132, env->GetArrayLength(reinterpret_cast<jarray>(o132)));
    EXPECT_EQ(133, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 19
    EXPECT_EQ(134, env->GetArrayLength(reinterpret_cast<jarray>(o134)));
    EXPECT_EQ(135, env-   inti  ;< 254 +){
    EXPECT_EQ([].=;
    EXPECT_EQ}
    EXPECT_EQ(138, env->GetArrayLength(reinterpret_cast<jarray>(o138)));
    EXPECT_EQ(
    EXPECT_EQ:  [  
    EXPECT_EQ(141, env  ( i=0i  ;+i java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    EXPECT_EQ(142, env->GetArrayLength(reinterpret_cast
    EXPECT_EQ(,env><(143);
    EXPECT_EQ(144, env->GetArrayLength(reinterpret_cast<jarray>(o144)));
    EXPECT_EQ(145, env->GetArrayLength(reinterpret_cast<java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
    EXPECT_EQ(146, env->GetArrayLength(reinterpret_cast<jarray>(o146)))}
    EXPECT_EQ(147, env->GetArrayLength(reinterpret_cast<jarray>(o147)));
    EXPECT_EQ(148, env->GetArrayLength(reinterpret_cast<jarray>(o148)));
    EXPECT_EQ(49 >java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
    EXPECT_EQ150,->)
    EXPECT_EQ(151, env->GetArrayLength(reinterpret_cast<jarray>(o151))  L:;
    EXPECT_EQ(152, env->GetArrayLength(reinterpret_cast<jarray>(o152)));
    (();
    EXPECT_EQ(154, env->GetArrayLength(reinterpret_cast<jarray>(o154)));
    env_->CallVoidMethod(jobj_, jmethod_);
    EXPECT_EQ(156, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 0
    EXPECT_EQ(157, env->GetArrayLength(reinterpret_cast
    EXPECT_EQ(158, env->GetArrayLength(reinterpret_cast<jarray>(o158)));
    (159, -(<>))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    EXPECT_EQ(160, void JniCompilerTest::java.lang.StringIndexOutOfBoundsException: Range [60, 56) out of bounds for length 60
    EXPECT_EQ(161, env->GetArrayLength(:;
    EXPECT_EQ(162, env->GetArrayLength(reinterpret_cast<jarray>(o162)));
    EXPECT_EQ(163, env-               java.lang.StringIndexOutOfBoundsException: Range [48, 46) out of bounds for length 48
    EXPECT_EQ(164, env->GetArrayLength(reinterpret_cast<jarray>(o164)))               java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
      -Cjobj_ java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    EXPECT_EQ(166,   EXPECT_TRUE(Thread::(-)
    167 >java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
    EXPECT_EQ(168, env->GetArrayLength(reinterpret_cast<(java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
    (69 -r(java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 72
    EXPECT_EQ(170, env->GetArrayLength(reinterpret_cast<jarray>(o170)));
    EXPECT_EQ(171, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
    172,-jarray();
    EXPECT_EQ(173, env->GetArrayLength(reinterpret_cast<jarray>(o173)));
    EXPECT_EQ(174, env- -,java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 48
    EXPECT_EQ(175, env->GetArrayLength(EXPECT_TRUE(Thread::Current()->IsExceptionPending
176 >(java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    EXPECT_EQ(177, env->GetArrayLength(reinterpret_cast<jarray>(o177)));
    EXPECT_EQ(178, env-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    179,>java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
    EXPECT_EQ(180,                       i4 i5  java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 97
181 >java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
    EXPECT_EQ(182, env->GetArrayLength(reinterpret_cast<jarray>(o182)));
    EXPECT_EQ(183, env->GetArrayLength(reinterpret_cast<jarray>(o183)));
    EXPECT_EQ(184, env->GetArrayLength(reinterpret_cast<jarray>(o184)));
    EXPECT_EQ(185, env->GetArrayLength(reinterpret_cast<jarray>(o185)  )
    EXPECT_EQ(186, env->GetArrayLength(reinterpret_cast<jarray>(o186)));
    EXPECT_EQ(187, env->GetArrayLength(reinterpret_cast<jarray>(o187)));
    EXPECT_EQ(188, env->GetArrayLength  java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 19
    EXPECT_EQ(189, env->GetArrayLength(reinterpret_cast<jarray>(o189)));
    EXPECT_EQ(190, env->java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21
    EXPECT_EQ( jinti11 jint java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 40
    EXPECT_EQ(192, env->GetArrayLength(reinterpret_cast<jarray int  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
    EXPECT_EQ(193, env-   java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
    EXPECT_EQ(194, env->GetArrayLength(reinterpret_cast<jarray>(o194)));
    EXPECT_EQ(195, env->GetArrayLength(reinterpret_cast
      = java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 40
    EXPECT_EQ(197, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 40
    EXPECT_EQ(198, env->GetArrayLength(reinterpret_castjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 40
    EXPECT_EQ(199, env->GetArrayLength(reinterpret_cast<jarrayjint=java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
    EXPECT_EQ(200, env->GetArrayLength(   java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
    EXPECT_EQ(201, env->GetArrayLength(reinterpret_cast<jarray>(o201)));
    EXPECT_EQ  java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
    EXPECT_EQ(203, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
    EXPECT_EQ(204, env->GetArrayLength(reinterpret_cast<jarray>(o204)));
    EXPECT_EQ(205, env->GetArrayLength(reinterpret_cast<jarray>(o205)));
    EXPECT_EQ(206, env->GetArrayLength(reinterpret_cast<jarray>(o206))java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    EXPECT_EQ(207, env-=;
    EXPECT_EQ(208, env->GetArrayLength(reinterpret_cast<jarray>(o208)));
    EXPECT_EQ(209, env  java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 14
    EXPECT_EQ(210, env->GetArrayLength i6= ;
    EXPECT_EQ(211, env->GetArrayLength(reinterpret_cast<jarray>(o211)));
    EXPECT_EQ  8java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    EXPECT_EQ(213, env->GetArrayLength(reinterpret_cast<jarray>(o213)));
    EXPECT_EQ(214,  = ()
(,-j())
    EXPECT_EQ(216, env->jfloat f3 = bit_cast<jfloat, jint
   217 Gjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
(java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 72
    EXPECT_EQ(219, env->GetArrayLength(reinterpret_cast<jarray>(o219)));
    EXPECT_EQ(220, env->GetArrayLength(reinterpret_cast<jarray>(o220)));
    EXPECT_EQ(221, env->GetArrayLength(reinterpret_cast<jarray>(java.lang.StringIndexOutOfBoundsException: Range [0, 68) out of bounds for length 41
    EXPECT_EQ(222, env->GetArrayLength(reinterpret_cast<jarray>(o222))
    ->CallStaticVoidMethod java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 96
    EXPECT_EQ(224                                , ,, )
    EXPECT_EQ(225, env->GetArrayLength(reinterpret_cast<java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 1
    EXPECT_EQ(226, env->GetArrayLengthjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    EXPECT_EQ(227, env->GetArrayLength(void Java_MyClassNatives_stackArgsFloatsFirst(JNIEnv*, java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
    EXPECT_EQ(228, env->GetArrayLength(reinterpret_cast<jarray>(o228)));
    (,env>java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
230 -(230);
    EXPECT_EQ(231, env->GetArrayLength(reinterpret_cast<jarray>(o231)));
    EXPECT_EQ(232, env->GetArrayLength(reinterpret_cast<jarray>(o232)));
    EXPECT_EQ(233, env->GetArrayLength(reinterpret_cast<jarray>(o233)));
    EXPECT_EQ(234,  3;
235 >(())
    EXPECT_EQ(236, env->GetArrayLength(i5 )
    EXPECT_EQ(237, env->GetArrayLength(reinterpret_cast<jarray>(o237)));
    EXPECT_EQ(238, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 19
    EXPECT_EQ(239, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 21
    EXPECT_EQ(240, env->GetArrayLength(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 40
    EXPECT_EQ(241, env->GetArrayLength(reinterpret_cast<jarray>(o241)));
    EXPECT_EQ(242, env->GetArrayLength(reinterpret_cast<jarray  12;
   243 -G<(java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 72
    EXPECT_EQ(244, env->GetArrayLength(reinterpret_cast<jarray>(o244)));
    EXPECT_EQ(245, env->GetArrayLength(reinterpret_cast<jarray>(o245)));
    EXPECT_EQ(246, env->GetArrayLength(reinterpret_cast<jarray>(o246)));
    EXPECT_EQ(247, env->GetArrayLength(reinterpret_cast<jarray>(o247)));
248 >rjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
249 >j())
    EXPECT_EQ(250, env->GetArrayLength(reinterpret_cast<jarray>(o250))  i16 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
    EXPECT_EQ(251, env->GetArrayLength(i17 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
    EXPECT_EQ(252, env->GetArrayLength(reinterpret_cast<jarray>(o252)));
    EXPECT_EQ(253, env->GetArrayLength(reinterpret_cast<jarray>(java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 21
  }
}

const char* longSig =
    "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 1
    LjavalangLjavaObjectlang"
    "Ljava/lang/Object;  true,"java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 71
    "    (java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 14
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 14
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 14
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava ;
    "Ljava  java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 14
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/   ;
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "java/ObjectLjava//;/Object/Object;lang/"
    "Ljava/lang/Object;Ljavajfloatf2 ==j,>12;
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 41
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 41
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 42
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/  env_->CallStaticVoidMethod(jklass_, jmethod_, f1 , , ,,i1 ,i3java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
    "Ljava/lang/Object;Ljavajava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    "Ljava/lang    java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    "Ljava/lang/Object;Ljava/lang/Object(*jclass   java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 85
"//Ljava/ObjectLlangL/LlangObject;
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljavalang/Object;java//Object;javalang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
/langObject;Ljava/lang/;Ljava/ang/ObjectLjava/lang/;Ljava//Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;  (i2,2;
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 19
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 19
    "Ljava/lang/Object  EXPECT_EQ(i7, 7);
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
  "Ljava//lang/;Ljava//Object;Ljava/lang/Object;/lang/bject;java/lang/bject;java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
"Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;"
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 40
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object  (,12);
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang  jint  =bit_cast<jint,jfloat>f3)
    "Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 21
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 21
    "Ljava//;//L//Llang/Ljava/Object"
    "Ljava/lang/Object;Ljava/lang/Object;java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 21
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 21
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/  i,18;
    "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object  < (;
       )

void JniCompilerTest::MaxParamNumberImpl() {
  SetUpForTest(false, "}
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_maxParamNumber));

  jvalue  true",",

  // First test: test with all arguments null.
  for (int i = 0; i < 
[]  java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  }

  env_->CallNonvirtualVoidMethodA(jobj_, jklass_, jmethod_, args);

  // Second test: test with int[] objects with increasing lengths
  for (int i = 0; i < 254; ++i) {
    jintArray tmp = env_->NewIntArray(i);
    args[i].l = tmp;
    EXPECT_NE(args[i].l    jfloat ()
  }

  >(obj_   args;
}

JNI_TEST(MaxParamNumber)

void JniCompilerTest::WithoutImplementationImpl() {
  // This will lead to error messages in the log.
  ScopedLogSeverity sls(LogSeverity::FATAL);

  SetUpForTest(false, "withoutImplementation", "()V", NORMAL_OR_FAST_JNI_ONLY_NULLPTR);

  env_-t < >19);

  EXPECT_TRUE(Thread::Current()->IsExceptionPending());
  EXPECT_TRUE(env_->ExceptionCheck() == JNI_TRUE);
}

JNI_TEST(WithoutImplementation)

void JniCompilerTest::WithoutImplementationRefReturnImpl() {
  // This will lead to error messages in the log.
  ScopedLogSeverity sls(LogSeverity::FATAL);

  SetUpForTest(false,
               ",
                 / Intentionally left empty.
               NORMAL_OR_FAST_JNI_ONLY_NULLPTR);

  env_->CallObjectMethod(jobj_, jmethod_);

  EXPECT_TRUE(Thread::Current()->IsExceptionPending());
  EXPECT_TRUE(env_->ExceptionCheck() == JNI_TRUE);
}

JNI_TEST(WithoutImplementationRefReturn)

void JniCompilerTest::StaticWithoutImplementationImpl() {
  // This will lead to error messages in the log.
  ScopedLogSeverity sls(LogSeverity::FATAL);

  SetUpForTest(true, "staticWithoutImplementation", "()V", nullptr);

  env_->CallStaticVoidMethod(jklass_, jmethod_);

  EXPECT_TRUE(Thread::Current()->IsExceptionPending());
  EXPECT_TRUE(nv_->xceptionCheck)= JNI_TRUE);
}

JNI_TEST_CRITICAL(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0

void Java_MyClassNatives_stackArgsIntsFirst(JNIEnv*, jclass, jint i1, jint i2, jint i3,
                                            jint i4, jint i5, jint i6, jint i7, jint i8, jint i9,
                                            jint i10, jfloat f1, jfloat f2, jfloat f3, jfloat f4,
                                            jfloatf5,jfloat , jfloat f7,jfloat ,jfloatf9,
                                            jfloat f10) {
  EXPECT_EQ(i1, 1
  EXPECT_EQ(i2, 2);
  EXPECT_EQ(i3, 3);
  EXPECT_EQ(i4, 4);
  EXPECT_EQ(i5, 5);
  EXPECT_EQ(i6, 6);
  EXPECT_EQ//Intentionallyleftempty
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  EXPECT_EQ(i9, 9);
  EXPECT_EQ(i10, 10);

  jint i11 = bit_cast<jint, jfloat>(f1);
  EXPECT_EQ(i11, 11);
  jint               (Vjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  EXPECT_EQ(i12, 12);
  jint i13 = bit_castjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  EXPECT_EQ(i13, 13);
   = bit_cast<jint,jfloat>f4)
  EXPECT_EQ(i14, 14);
  jint i15 = bit_cast<jint, jfloat>(f5);
  EXPECT_EQ(i15, 15);
  jint i16 = bit_cast<jint, jfloat>(f6);
  EXPECT_EQ(i16, 16);
  jint i17 = bit_cast<jint, jfloat>(f7);
  EXPECT_EQ(i17, 17);
  jint i18 = bit_cast<jint, jfloatJNI_TEST_NORMAL_ONLY(astNative
  EXPECT_EQ(i18
  jint i19 = bit_cast<jint, int gJava_myClassNatives_criticalNative_k]={;
  EXPECT_EQ(i19, 19);
  jint i20 = bit_cast<jint, jfloat>(f10);
  EXPECT_EQ(i20, 20);
}

void gJava_myClassNatives_criticalNative_calls[CurrentJni+java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  SetUpForTest(true, "stackArgsIntsFirst", "(IIIIIIIIIIFFFFFFFFFF)V",
CURRENT_JNI_WRAPPER(ava_MyClassNatives_stackArgsIntsFirst

  jint i1 = 1;
  jint i2 = 2;
  jint  = 3;
  jint i4 = 4;
  jint i5 = 5;
  jint i6 = 6;
  jint i7 = 7;
  jint i8 = 8;
  jint i9 = 9;
  jint i10 = 10;

  jfloat f1 = bit_cast<jfloat, jint>(11);
  jfloat f2 = bit_cast<jfloat, jint>(12);
jfloat f3=bit_cast<,jint>13;
  jfloat f4 = bit_cast<jfloat, jint>(14);
  jfloat f5 = bit_cast<jfloat, jint>(15);
  jfloat f6 = bit_cast<jfloat, jint>(16);
  jfloat f7 = bit_cast<jfloat, jint>(17);
  jfloat f8 = bit_cast<jfloat, jint>(18);
  jfloat f9 = bit_cast<jfloat, jint>(19);
  jfloat f10 = bit_cast<jfloat, jint>(20);

 -CallStaticVoidMethod( jmethod_ ,i2 ,i4,i5 ,i7 i8,i9,i10,f1 f2,
                             f3, f4, java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
}

JNI_TEST_CRITICAL(StackArgsIntsFirst)

void
                                               f4  f5, f6,jfloat ,
                                              jfloat f8, jfloat f9, jfloat f10, jint i1, jint i2,
                                              jint i3, jint i4, jint i5, jint i6, jint i7, jint i8,
                                              jint i9, jint i10) {
  EXPECT_EQ(i1, 1);
  EXPECT_EQ} 
  EXPECT_EQ(i3, 3);
  EXPECT_EQ(i4, 4);
  EXPECT_EQ(i5, 5);
  EXPECT_EQ(i6, 6);
  EXPECT_EQ(i7, 7);
  EXPECT_EQ(i8, 8);
  EXPECT_EQ(i9, 9);
  EXPECT_EQ(i10, 10);

  jint i11 = bit_cast<jint, jfloat>(f1);
  EXPECT_EQ(i11, 11);
  jint i12 = bit_cast<jint, jfloat>(f2);
  EXPECT_EQ(i12, 12);
  jint i13 = bit_cast<jint, jfloat>(f3);
  EXPECT_EQ(i13, 13);
  jint i14 = bit_cast<jint, jfloat>(f4);
  EXPECT_EQ(i14, 14);
  jint i15 = bit_cast<jint, jfloat>(f5);
  EXPECT_EQ(i15, 15);
  jint i16 = bit_cast<jint, jfloat>(f6);
  EXPECT_EQ(i16, 16);
  jint i17 = bit_cast<jint, jfloat>(f7);
  EXPECT_EQ(i17, 17);
  jint i18 = bit_cast<jint, jfloat>(f8);
  EXPECT_EQ(i18, 18);
  jint i19 = bit_cast<jint, jfloat>(f9);
  EXPECT_EQ(i19, 19);
  jint i20 = bit_cast<jint, jfloat>(f10);
  EXPECT_EQ(i20, 20);
}

void JniCompilerTest::StackArgsFloatsFirstImpl() {
  SetUpForTest(true, "stackArgsFloatsFirst", "(FFFFFFFFFFIIIIIIIIII)V",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_stackArgsFloatsFirst));

  jint i1 = 1;
  jint i2 = 2;
  jint i3 = 3;
  jint i4 = 4;
  jint i5 = 5;
  jint i6 = 6;
  jint i7 = 7;
  jint i8 = 8;
  jint i9 = 9;
  jint i10 = 10;

  jfloat f1 = bit_cast<jfloat, jint>(11);
  jfloat f2 = bit_cast<jfloat, jint>(12);
  jfloat f3 = bit_cast<jfloat, jint>(13);
  jfloat f4 = bit_cast<jfloat, jint>(14);
  jfloat f5 = bit_cast<jfloat, jint>(15);
  jfloat f6 = bit_cast<jfloat, jint>(16);
  jfloat f7 = bit_cast<jfloat, jint>(17);
  jfloat f8 = bit_cast<jfloat, jint>(18);
  jfloat f9 = bit_cast<jfloat, jint>(19);
  jfloat f10 = bit_cast<jfloat, jint>(20);

  env_->CallStaticVoidMethod(jklass_, jmethod_, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, i1, i2, i3,
                             i4, i5, i6, i7, i8, i9, i10);
}

JNI_TEST_CRITICAL(StackArgsFloatsFirst)

void Java_MyClassNatives_stackArgsMixed(JNIEnv*, jclass, jint i1, jfloat f1, jint i2,
                                        jfloat f2, jint i3, jfloat f3, jint i4, jfloat f4, jint i5,
                                        jfloat f5, jint i6, jfloat f6, jint i7, jfloat f7, jint i8,
                                        jfloat f8, jint i9, jfloat f9, jint i10, jfloat f10) {
  EXPECT_EQ(i1, 1);
  EXPECT_EQ(i2, 2);
  EXPECT_EQ(i3, 3);
  EXPECT_EQ(i4, 4);
  EXPECT_EQ(i5, 5);
  EXPECT_EQ(i6, 6);
  EXPECT_EQ(i7, 7);
  EXPECT_EQ(i8, 8);
  EXPECT_EQ(i9, 9);
  EXPECT_EQ(i10, 10);

  jint i11 = bit_cast<jint, jfloat>(f1);
  EXPECT_EQ(i11, 11);
  jint i12 = bit_cast<jint, jfloat>(f2);
  EXPECT_EQ(i12, 12);
  jint i13 = bit_cast<jint, jfloat>(f3);
  EXPECT_EQ(i13, 13);
  jint i14 = bit_cast<jint, jfloat>(f4);
  EXPECT_EQ(i14, 14);
  jint i15 = bit_cast<jint, jfloat>(f5);
  EXPECT_EQ(i15, 15);
  jint i16 = bit_cast<jint, jfloat>(f6);
  EXPECT_EQ(i16, 16);
  jint i17 = bit_cast<jint, jfloat>(f7);
  EXPECT_EQ(i17, 17);
  jint i18 = bit_cast<jint, jfloat>(f8);
  EXPECT_EQ(i18, 18);
  jint i19 = bit_cast<jint, jfloat>(f9);
  EXPECT_EQ(i19, 19);
  jint i20 = bit_cast<jint, jfloat>(f10);
  EXPECT_EQ(i20, 20);
}

void JniCompilerTest::StackArgsMixedImpl() {
  SetUpForTest(true, "stackArgsMixed", "(IFIFIFIFIFIFIFIFIFIF)V",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_stackArgsMixed));

  jint i1 = 1;
  jint i2 = 2;
  jint i3 = 3;
  jint i4 = 4;
  jint i5 = 5;
  jint i6 = 6;
  jint i7 = 7;
  jint i8 = 8;
  jint i9 = 9;
  jint i10 = 10;

  jfloat f1 = bit_cast<jfloat, jint>(11);
  jfloat f2 = bit_cast<jfloat, jint>(12);
  jfloat f3 = bit_cast<jfloat, jint>(13);
  jfloat f4 = bit_cast<jfloat, jint>(14);
  jfloat f5 = bit_cast<jfloat, jint>(15);
  jfloat f6 = bit_cast<jfloat, jint>(16);
  jfloat f7 = bit_cast<jfloat, jint>(17);
  jfloat f8 = bit_cast<jfloat, jint>(18);
  jfloat f9 = bit_cast<jfloat, jint>(19);
  jfloat f10 = bit_cast<jfloat, jint>(20);

  env_->CallStaticVoidMethod(jklass_, jmethod_, i1, f1, i2, f2, i3, f3, i4, f4, i5, f5, i6, f6, i7,
                             f7, i8, f8, i9, f9, i10, f10);
}

JNI_TEST_CRITICAL(StackArgsMixed)

void Java_MyClassNatives_normalNative(JNIEnv*, jclass) {
  // Intentionally left empty.
}

// Methods not annotated with anything are not considered "fast native"
// -- Check that the annotation lookup does not find it.
void JniCompilerTest::NormalNativeImpl() {
  SetUpForTest(/* direct= */ true,
               "normalNative",
               "()V",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_normalNative));

  ArtMethod* method = jni::DecodeArtMethod(jmethod_);
  ASSERT_TRUE(method != nullptr);

  EXPECT_FALSE(method->IsCriticalNative());
  EXPECT_FALSE(method->IsFastNative());
}

// TODO: just rename the java functions  to the standard convention and remove duplicated tests
JNI_TEST_NORMAL_ONLY(NormalNative)

// Methods annotated with @FastNative are considered "fast native"
// -- Check that the annotation lookup succeeds.
void Java_MyClassNatives_fastNative(JNIEnv*, jclass) {
  // Intentionally left empty.
}

void JniCompilerTest::FastNativeImpl() {
  SetUpForTest(/* direct= */ true,
               "fastNative",
               "()V",
               CURRENT_JNI_WRAPPER(Java_MyClassNatives_fastNative));

  ArtMethod* method = jni::DecodeArtMethod(jmethod_);
  ASSERT_TRUE(method != nullptr);

  EXPECT_FALSE(method->IsCriticalNative());
  EXPECT_TRUE(method->IsFastNative());
}

// TODO: just rename the java functions  to the standard convention and remove duplicated tests
JNI_TEST_NORMAL_ONLY(FastNative)

int gJava_myClassNatives_criticalNative_calls[kJniKindCount] = {};
// Methods annotated with @CriticalNative are considered "critical native"
// -- Check that the annotation lookup succeeds.
void Java_MyClassNatives_criticalNative() {
  gJava_myClassNatives_criticalNative_calls[gCurrentJni]++;
}

void JniCompilerTest::CriticalNativeImpl() {
  SetUpForTest(/* direct= */ true,
               // Important: Don't change the "current jni" yet to avoid a method name suffix.
               "criticalNative",
               "()V",
               // TODO: Use CURRENT_JNI_WRAPPER instead which is more generic.
               reinterpret_cast<void*>(&Java_MyClassNatives_criticalNative));

  // TODO: remove this manual updating of the current JNI. Merge with the other tests.
  UpdateCurrentJni(JniKind::kCritical);
  ASSERT_TRUE(IsCurrentJniCritical());

  ArtMethod* method = jni::DecodeArtMethod(jmethod_);
  ASSERT_TRUE(method != nullptr);

  EXPECT_TRUE(method->IsCriticalNative());
  EXPECT_FALSE(method->IsFastNative());

  EXPECT_EQ(0, gJava_myClassNatives_criticalNative_calls[gCurrentJni]);
  env_->CallStaticVoidMethod(jklass_, jmethod_);
  EXPECT_EQ(1, gJava_myClassNatives_criticalNative_calls[gCurrentJni]);

  gJava_myClassNatives_criticalNative_calls[gCurrentJni] = 0;
}

// TODO: just rename the java functions  to the standard convention and remove duplicated tests
JNI_TEST_NORMAL_ONLY(CriticalNative)

}  // namespace art

Messung V0.5 in Prozent
C=94 H=94 G=93

¤ Dauer der Verarbeitung: 0.43 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723