• Home
  • Raw
  • Download

Lines Matching refs:h_klass

44     MutableHandle<mirror::Class> h_klass(  in testTransactionAbort()  local
47 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
48 class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in testTransactionAbort()
49 ASSERT_TRUE(h_klass->IsInitialized()); in testTransactionAbort()
51 h_klass.Assign(class_linker_->FindSystemClass(soa.Self(), in testTransactionAbort()
53 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
54 class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in testTransactionAbort()
55 ASSERT_TRUE(h_klass->IsInitialized()); in testTransactionAbort()
58 h_klass.Assign(class_linker_->FindClass(soa.Self(), "LTransaction$AbortHelperClass;", in testTransactionAbort()
60 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
61 class_linker_->VerifyClass(soa.Self(), h_klass); in testTransactionAbort()
62 ASSERT_TRUE(h_klass->IsVerified()); in testTransactionAbort()
65 h_klass.Assign(class_linker_->FindClass(soa.Self(), tested_class_signature, class_loader)); in testTransactionAbort()
66 ASSERT_TRUE(h_klass != nullptr); in testTransactionAbort()
67 class_linker_->VerifyClass(soa.Self(), h_klass); in testTransactionAbort()
68 ASSERT_TRUE(h_klass->IsVerified()); in testTransactionAbort()
70 ClassStatus old_status = h_klass->GetStatus(); in testTransactionAbort()
71 LockWord old_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
74 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in testTransactionAbort()
77 ASSERT_TRUE(h_klass->IsErroneous()); in testTransactionAbort()
81 LockWord new_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
87 ASSERT_EQ(old_status, h_klass->GetStatus()); in testTransactionAbort()
95 Handle<mirror::Class> h_klass( in TEST_F() local
97 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
100 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
102 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
105 EXPECT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
112 Handle<mirror::Class> h_klass( in TEST_F() local
114 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
115 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
117 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
139 Handle<mirror::Class> h_klass( in TEST_F() local
141 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
150 mirror::Array::Alloc<true>(soa.Self(), h_klass.Get(), kArraySize, in TEST_F()
151 h_klass->GetComponentSizeShift(), in TEST_F()
154 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
169 Handle<mirror::Class> h_klass( in TEST_F() local
171 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
172 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
174 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
178 ArtField* booleanField = h_klass->FindDeclaredStaticField("booleanField", "Z"); in TEST_F()
181 ASSERT_EQ(booleanField->GetBoolean(h_klass.Get()), false); in TEST_F()
183 ArtField* byteField = h_klass->FindDeclaredStaticField("byteField", "B"); in TEST_F()
186 ASSERT_EQ(byteField->GetByte(h_klass.Get()), 0); in TEST_F()
188 ArtField* charField = h_klass->FindDeclaredStaticField("charField", "C"); in TEST_F()
191 ASSERT_EQ(charField->GetChar(h_klass.Get()), 0u); in TEST_F()
193 ArtField* shortField = h_klass->FindDeclaredStaticField("shortField", "S"); in TEST_F()
196 ASSERT_EQ(shortField->GetShort(h_klass.Get()), 0); in TEST_F()
198 ArtField* intField = h_klass->FindDeclaredStaticField("intField", "I"); in TEST_F()
201 ASSERT_EQ(intField->GetInt(h_klass.Get()), 0); in TEST_F()
203 ArtField* longField = h_klass->FindDeclaredStaticField("longField", "J"); in TEST_F()
206 ASSERT_EQ(longField->GetLong(h_klass.Get()), static_cast<int64_t>(0)); in TEST_F()
208 ArtField* floatField = h_klass->FindDeclaredStaticField("floatField", "F"); in TEST_F()
211 ASSERT_FLOAT_EQ(floatField->GetFloat(h_klass.Get()), static_cast<float>(0.0f)); in TEST_F()
213 ArtField* doubleField = h_klass->FindDeclaredStaticField("doubleField", "D"); in TEST_F()
216 ASSERT_DOUBLE_EQ(doubleField->GetDouble(h_klass.Get()), static_cast<double>(0.0)); in TEST_F()
218 ArtField* objectField = h_klass->FindDeclaredStaticField("objectField", in TEST_F()
222 ASSERT_EQ(objectField->GetObject(h_klass.Get()), nullptr); in TEST_F()
228 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
230 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
234 booleanField->SetBoolean<true>(h_klass.Get(), true); in TEST_F()
235 byteField->SetByte<true>(h_klass.Get(), 1); in TEST_F()
236 charField->SetChar<true>(h_klass.Get(), 1u); in TEST_F()
237 shortField->SetShort<true>(h_klass.Get(), 1); in TEST_F()
238 intField->SetInt<true>(h_klass.Get(), 1); in TEST_F()
239 longField->SetLong<true>(h_klass.Get(), 1); in TEST_F()
240 floatField->SetFloat<true>(h_klass.Get(), 1.0); in TEST_F()
241 doubleField->SetDouble<true>(h_klass.Get(), 1.0); in TEST_F()
242 objectField->SetObject<true>(h_klass.Get(), h_obj.Get()); in TEST_F()
246 EXPECT_EQ(booleanField->GetBoolean(h_klass.Get()), false); in TEST_F()
247 EXPECT_EQ(byteField->GetByte(h_klass.Get()), 0); in TEST_F()
248 EXPECT_EQ(charField->GetChar(h_klass.Get()), 0u); in TEST_F()
249 EXPECT_EQ(shortField->GetShort(h_klass.Get()), 0); in TEST_F()
250 EXPECT_EQ(intField->GetInt(h_klass.Get()), 0); in TEST_F()
251 EXPECT_EQ(longField->GetLong(h_klass.Get()), static_cast<int64_t>(0)); in TEST_F()
252 EXPECT_FLOAT_EQ(floatField->GetFloat(h_klass.Get()), static_cast<float>(0.0f)); in TEST_F()
253 EXPECT_DOUBLE_EQ(doubleField->GetDouble(h_klass.Get()), static_cast<double>(0.0)); in TEST_F()
254 EXPECT_EQ(objectField->GetObject(h_klass.Get()), nullptr); in TEST_F()
265 Handle<mirror::Class> h_klass( in TEST_F() local
267 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
268 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
270 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
274 Handle<mirror::Object> h_instance(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
278 ArtField* booleanField = h_klass->FindDeclaredInstanceField("booleanField", "Z"); in TEST_F()
283 ArtField* byteField = h_klass->FindDeclaredInstanceField("byteField", "B"); in TEST_F()
288 ArtField* charField = h_klass->FindDeclaredInstanceField("charField", "C"); in TEST_F()
293 ArtField* shortField = h_klass->FindDeclaredInstanceField("shortField", "S"); in TEST_F()
298 ArtField* intField = h_klass->FindDeclaredInstanceField("intField", "I"); in TEST_F()
303 ArtField* longField = h_klass->FindDeclaredInstanceField("longField", "J"); in TEST_F()
308 ArtField* floatField = h_klass->FindDeclaredInstanceField("floatField", "F"); in TEST_F()
313 ArtField* doubleField = h_klass->FindDeclaredInstanceField("doubleField", "D"); in TEST_F()
318 ArtField* objectField = h_klass->FindDeclaredInstanceField("objectField", in TEST_F()
328 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
330 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
365 Handle<mirror::Class> h_klass( in TEST_F() local
367 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
368 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
370 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
374 ArtField* booleanArrayField = h_klass->FindDeclaredStaticField("booleanArrayField", "[Z"); in TEST_F()
377 booleanArrayField->GetObject(h_klass.Get())->AsBooleanArray()); in TEST_F()
382 ArtField* byteArrayField = h_klass->FindDeclaredStaticField("byteArrayField", "[B"); in TEST_F()
385 hs.NewHandle(byteArrayField->GetObject(h_klass.Get())->AsByteArray()); in TEST_F()
390 ArtField* charArrayField = h_klass->FindDeclaredStaticField("charArrayField", "[C"); in TEST_F()
393 hs.NewHandle(charArrayField->GetObject(h_klass.Get())->AsCharArray()); in TEST_F()
398 ArtField* shortArrayField = h_klass->FindDeclaredStaticField("shortArrayField", "[S"); in TEST_F()
401 hs.NewHandle(shortArrayField->GetObject(h_klass.Get())->AsShortArray()); in TEST_F()
406 ArtField* intArrayField = h_klass->FindDeclaredStaticField("intArrayField", "[I"); in TEST_F()
409 hs.NewHandle(intArrayField->GetObject(h_klass.Get())->AsIntArray()); in TEST_F()
414 ArtField* longArrayField = h_klass->FindDeclaredStaticField("longArrayField", "[J"); in TEST_F()
417 hs.NewHandle(longArrayField->GetObject(h_klass.Get())->AsLongArray()); in TEST_F()
422 ArtField* floatArrayField = h_klass->FindDeclaredStaticField("floatArrayField", "[F"); in TEST_F()
425 hs.NewHandle(floatArrayField->GetObject(h_klass.Get())->AsFloatArray()); in TEST_F()
430 ArtField* doubleArrayField = h_klass->FindDeclaredStaticField("doubleArrayField", "[D"); in TEST_F()
433 hs.NewHandle(doubleArrayField->GetObject(h_klass.Get())->AsDoubleArray()); in TEST_F()
439 h_klass->FindDeclaredStaticField("objectArrayField", "[Ljava/lang/Object;"); in TEST_F()
442 hs.NewHandle(objectArrayField->GetObject(h_klass.Get())->AsObjectArray<mirror::Object>()); in TEST_F()
451 Handle<mirror::Object> h_obj(hs.NewHandle(h_klass->AllocObject(soa.Self()))); in TEST_F()
453 ASSERT_OBJ_PTR_EQ(h_obj->GetClass(), h_klass.Get()); in TEST_F()
488 Handle<mirror::Class> h_klass( in TEST_F() local
491 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
493 Handle<mirror::DexCache> h_dex_cache(hs.NewHandle(h_klass->GetDexCache())); in TEST_F()
509 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
511 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
524 ASSERT_FALSE(h_klass->IsInitialized()); in TEST_F()
536 Handle<mirror::Class> h_klass( in TEST_F() local
539 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
540 class_linker_->VerifyClass(soa.Self(), h_klass); in TEST_F()
541 ASSERT_TRUE(h_klass->IsVerified()); in TEST_F()
544 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
547 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()
559 Handle<mirror::Class> h_klass( in TEST_F() local
562 ASSERT_TRUE(h_klass != nullptr); in TEST_F()
563 class_linker_->VerifyClass(soa.Self(), h_klass); in TEST_F()
564 ASSERT_TRUE(h_klass->IsVerified()); in TEST_F()
567 bool success = class_linker_->EnsureInitialized(soa.Self(), h_klass, true, true); in TEST_F()
570 ASSERT_TRUE(h_klass->IsInitialized()); in TEST_F()