Lines Matching refs:h_klass

49     MutableHandle<mirror::Class> h_klass(  in testTransactionAbort()  local
52 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
53 class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in testTransactionAbort()
54 ASSERT_TRUE(h_klass->IsInitialized()); in testTransactionAbort()
56 h_klass.Assign(class_linker_->FindSystemClass(soa.Self(), in testTransactionAbort()
58 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
59 class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in testTransactionAbort()
60 ASSERT_TRUE(h_klass->IsInitialized()); in testTransactionAbort()
63 h_klass.Assign(class_linker_->FindClass(soa.Self(), "LTransaction$AbortHelperClass;", in testTransactionAbort()
65 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
66 class_linker_->VerifyClass(soa.Self(), /* verifier_deps= */ nullptr, h_klass); in testTransactionAbort()
67 ASSERT_TRUE(h_klass->IsVerified()); in testTransactionAbort()
70 h_klass.Assign(class_linker_->FindClass(soa.Self(), tested_class_signature, class_loader)); in testTransactionAbort()
71 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
72 class_linker_->VerifyClass(soa.Self(), /* verifier_deps= */ nullptr, h_klass); in testTransactionAbort()
73 ASSERT_TRUE(h_klass->IsVerified()); in testTransactionAbort()
75 ClassStatus old_status = h_klass->GetStatus(); in testTransactionAbort()
76 LockWord old_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
79 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in testTransactionAbort()
82 ASSERT_TRUE(h_klass->IsErroneous()); in testTransactionAbort()
86 LockWord new_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
92 ASSERT_EQ(old_status, h_klass->GetStatus()); in testTransactionAbort()
100 Handle<mirror::Class> h_klass( in TEST_F() local
102 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
105 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
107 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
110 EXPECT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
117 Handle<mirror::Class> h_klass( in TEST_F() local
119 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
120 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
122 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
144 Handle<mirror::Class> h_klass( in TEST_F() local
146 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
155 h_klass.Get(), in TEST_F()
157 h_klass->GetComponentSizeShift(), in TEST_F()
160 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
175 Handle<mirror::Class> h_klass( in TEST_F() local
177 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
178 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
180 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
184 ArtField* booleanField = h_klass->FindDeclaredStaticField("booleanField", "Z"); in TEST_F()
187 ASSERT_EQ(booleanField->GetBoolean(h_klass.Get()), false); in TEST_F()
189 ArtField* byteField = h_klass->FindDeclaredStaticField("byteField", "B"); in TEST_F()
192 ASSERT_EQ(byteField->GetByte(h_klass.Get()), 0); in TEST_F()
194 ArtField* charField = h_klass->FindDeclaredStaticField("charField", "C"); in TEST_F()
197 ASSERT_EQ(charField->GetChar(h_klass.Get()), 0u); in TEST_F()
199 ArtField* shortField = h_klass->FindDeclaredStaticField("shortField", "S"); in TEST_F()
202 ASSERT_EQ(shortField->GetShort(h_klass.Get()), 0); in TEST_F()
204 ArtField* intField = h_klass->FindDeclaredStaticField("intField", "I"); in TEST_F()
207 ASSERT_EQ(intField->GetInt(h_klass.Get()), 0); in TEST_F()
209 ArtField* longField = h_klass->FindDeclaredStaticField("longField", "J"); in TEST_F()
212 ASSERT_EQ(longField->GetLong(h_klass.Get()), static_cast<int64_t>(0)); in TEST_F()
214 ArtField* floatField = h_klass->FindDeclaredStaticField("floatField", "F"); in TEST_F()
217 ASSERT_FLOAT_EQ(floatField->GetFloat(h_klass.Get()), static_cast<float>(0.0f)); in TEST_F()
219 ArtField* doubleField = h_klass->FindDeclaredStaticField("doubleField", "D"); in TEST_F()
222 ASSERT_DOUBLE_EQ(doubleField->GetDouble(h_klass.Get()), static_cast<double>(0.0)); in TEST_F()
224 ArtField* objectField = h_klass->FindDeclaredStaticField("objectField", in TEST_F()
228 ASSERT_EQ(objectField->GetObject(h_klass.Get()), nullptr); in TEST_F()
234 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
236 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
240 booleanField->SetBoolean<true>(h_klass.Get(), true); in TEST_F()
241 byteField->SetByte<true>(h_klass.Get(), 1); in TEST_F()
242 charField->SetChar<true>(h_klass.Get(), 1u); in TEST_F()
243 shortField->SetShort<true>(h_klass.Get(), 1); in TEST_F()
244 intField->SetInt<true>(h_klass.Get(), 1); in TEST_F()
245 longField->SetLong<true>(h_klass.Get(), 1); in TEST_F()
246 floatField->SetFloat<true>(h_klass.Get(), 1.0); in TEST_F()
247 doubleField->SetDouble<true>(h_klass.Get(), 1.0); in TEST_F()
248 objectField->SetObject<true>(h_klass.Get(), h_obj.Get()); in TEST_F()
252 EXPECT_EQ(booleanField->GetBoolean(h_klass.Get()), false); in TEST_F()
253 EXPECT_EQ(byteField->GetByte(h_klass.Get()), 0); in TEST_F()
254 EXPECT_EQ(charField->GetChar(h_klass.Get()), 0u); in TEST_F()
255 EXPECT_EQ(shortField->GetShort(h_klass.Get()), 0); in TEST_F()
256 EXPECT_EQ(intField->GetInt(h_klass.Get()), 0); in TEST_F()
257 EXPECT_EQ(longField->GetLong(h_klass.Get()), static_cast<int64_t>(0)); in TEST_F()
258 EXPECT_FLOAT_EQ(floatField->GetFloat(h_klass.Get()), static_cast<float>(0.0f)); in TEST_F()
259 EXPECT_DOUBLE_EQ(doubleField->GetDouble(h_klass.Get()), static_cast<double>(0.0)); in TEST_F()
260 EXPECT_EQ(objectField->GetObject(h_klass.Get()), nullptr); in TEST_F()
271 Handle<mirror::Class> h_klass( in TEST_F() local
273 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
274 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
276 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
280 Handle<mirror::Object> h_instance(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
284 ArtField* booleanField = h_klass->FindDeclaredInstanceField("booleanField", "Z"); in TEST_F()
289 ArtField* byteField = h_klass->FindDeclaredInstanceField("byteField", "B"); in TEST_F()
294 ArtField* charField = h_klass->FindDeclaredInstanceField("charField", "C"); in TEST_F()
299 ArtField* shortField = h_klass->FindDeclaredInstanceField("shortField", "S"); in TEST_F()
304 ArtField* intField = h_klass->FindDeclaredInstanceField("intField", "I"); in TEST_F()
309 ArtField* longField = h_klass->FindDeclaredInstanceField("longField", "J"); in TEST_F()
314 ArtField* floatField = h_klass->FindDeclaredInstanceField("floatField", "F"); in TEST_F()
319 ArtField* doubleField = h_klass->FindDeclaredInstanceField("doubleField", "D"); in TEST_F()
324 ArtField* objectField = h_klass->FindDeclaredInstanceField("objectField", in TEST_F()
334 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
336 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
371 Handle<mirror::Class> h_klass( in TEST_F() local
373 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
374 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
376 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
380 ArtField* booleanArrayField = h_klass->FindDeclaredStaticField("booleanArrayField", "[Z"); in TEST_F()
383 booleanArrayField->GetObject(h_klass.Get())->AsBooleanArray()); in TEST_F()
388 ArtField* byteArrayField = h_klass->FindDeclaredStaticField("byteArrayField", "[B"); in TEST_F()
391 hs.NewHandle(byteArrayField->GetObject(h_klass.Get())->AsByteArray()); in TEST_F()
396 ArtField* charArrayField = h_klass->FindDeclaredStaticField("charArrayField", "[C"); in TEST_F()
399 hs.NewHandle(charArrayField->GetObject(h_klass.Get())->AsCharArray()); in TEST_F()
404 ArtField* shortArrayField = h_klass->FindDeclaredStaticField("shortArrayField", "[S"); in TEST_F()
407 hs.NewHandle(shortArrayField->GetObject(h_klass.Get())->AsShortArray()); in TEST_F()
412 ArtField* intArrayField = h_klass->FindDeclaredStaticField("intArrayField", "[I"); in TEST_F()
415 hs.NewHandle(intArrayField->GetObject(h_klass.Get())->AsIntArray()); in TEST_F()
420 ArtField* longArrayField = h_klass->FindDeclaredStaticField("longArrayField", "[J"); in TEST_F()
423 hs.NewHandle(longArrayField->GetObject(h_klass.Get())->AsLongArray()); in TEST_F()
428 ArtField* floatArrayField = h_klass->FindDeclaredStaticField("floatArrayField", "[F"); in TEST_F()
431 hs.NewHandle(floatArrayField->GetObject(h_klass.Get())->AsFloatArray()); in TEST_F()
436 ArtField* doubleArrayField = h_klass->FindDeclaredStaticField("doubleArrayField", "[D"); in TEST_F()
439 hs.NewHandle(doubleArrayField->GetObject(h_klass.Get())->AsDoubleArray()); in TEST_F()
445 h_klass->FindDeclaredStaticField("objectArrayField", "[Ljava/lang/Object;"); in TEST_F()
448 hs.NewHandle(objectArrayField->GetObject(h_klass.Get())->AsObjectArray<mirror::Object>()); in TEST_F()
457 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
459 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
494 Handle<mirror::Class> h_klass( in TEST_F() local
497 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
499 Handle<mirror::DexCache> h_dex_cache(hs.NewHandle(h_klass->GetDexCache())); in TEST_F()
515 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
517 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
530 ASSERT_FALSE(h_klass->IsInitialized()); in TEST_F()
542 Handle<mirror::Class> h_klass( in TEST_F() local
545 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
546 class_linker_->VerifyClass(soa.Self(), /* verifier_deps= */ nullptr, h_klass); in TEST_F()
547 ASSERT_TRUE(h_klass->IsVerified()); in TEST_F()
550 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
553 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
565 Handle<mirror::Class> h_klass( in TEST_F() local
568 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
569 class_linker_->VerifyClass(soa.Self(), /* verifier_deps= */ nullptr, h_klass); in TEST_F()
570 ASSERT_TRUE(h_klass->IsVerified()); in TEST_F()
573 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
576 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()