Lines Matching refs:ArrayRef
39 static const ArrayRef<const uint8_t> kCallCode;
41 static const ArrayRef<const uint8_t> kNopCode;
43 static const ArrayRef<const uint8_t> kUnpatchedPcRelativeCode;
143 uint32_t Create2MethodsWithGap(const ArrayRef<const uint8_t>& method1_code, in Create2MethodsWithGap()
144 const ArrayRef<const LinkerPatch>& method1_patches, in Create2MethodsWithGap()
145 const ArrayRef<const uint8_t>& last_method_code, in Create2MethodsWithGap()
146 const ArrayRef<const LinkerPatch>& last_method_patches, in Create2MethodsWithGap()
175 AddCompiledMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(gap_code)); in Create2MethodsWithGap()
222 const ArrayRef<const uint8_t>& code, in AddCompiledMethod()
223 const ArrayRef<const LinkerPatch>& patches = ArrayRef<const LinkerPatch>()) { in AddCompiledMethod()
233 thunk_provider_.SetThunkCode(patch, ArrayRef<const uint8_t>(thunk_code), debug_name); in AddCompiledMethod()
256 ArrayRef<const uint8_t> linked_code(&output_[thunk_offset], expected_code.size()); in CheckThunk()
257 if (linked_code == ArrayRef<const uint8_t>(expected_code)) { in CheckThunk()
261 DumpDiff(ArrayRef<const uint8_t>(expected_code), linked_code); in CheckThunk()
277 void CheckPcRelativePatch(const ArrayRef<const LinkerPatch>& patches, uint32_t target_offset);
337 const ArrayRef<const uint8_t> Thumb2RelativePatcherTest::kCallCode(kCallRawCode);
343 const ArrayRef<const uint8_t> Thumb2RelativePatcherTest::kNopCode(kNopRawCode);
350 const ArrayRef<const uint8_t> Thumb2RelativePatcherTest::kUnpatchedPcRelativeCode(
363 CheckPcRelativePatch(ArrayRef<const LinkerPatch>(patches), bss_begin_ + string_entry_offset); in TestStringBssEntry()
373 CheckPcRelativePatch(ArrayRef<const LinkerPatch>(patches), string_offset); in TestStringReference()
376 void Thumb2RelativePatcherTest::CheckPcRelativePatch(const ArrayRef<const LinkerPatch>& patches, in CheckPcRelativePatch()
378 AddCompiledMethod(MethodRef(1u), kUnpatchedPcRelativeCode, ArrayRef<const LinkerPatch>(patches)); in CheckPcRelativePatch()
404 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in CheckPcRelativePatch()
411 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
417 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
424 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(method1_patches)); in TEST_F()
428 AddCompiledMethod(MethodRef(2u), kCallCode, ArrayRef<const LinkerPatch>(method2_patches)); in TEST_F()
439 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(method1_expected_code))); in TEST_F()
444 EXPECT_TRUE(CheckLinkedMethod(MethodRef(2u), ArrayRef<const uint8_t>(method2_expected_code))); in TEST_F()
451 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
459 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
466 ArrayRef<const uint8_t> last_method_code(last_method_raw_code); in TEST_F()
475 ArrayRef<const LinkerPatch>(), in TEST_F()
477 ArrayRef<const LinkerPatch>(last_method_patches), in TEST_F()
494 ArrayRef<const uint8_t>(expected_code))); in TEST_F()
501 ArrayRef<const uint8_t> method1_code(method1_raw_code); in TEST_F()
510 ArrayRef<const LinkerPatch>(method1_patches), in TEST_F()
512 ArrayRef<const LinkerPatch>(), in TEST_F()
518 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
524 ArrayRef<const uint8_t> last_method_code(last_method_raw_code); in TEST_F()
532 ArrayRef<const LinkerPatch>(), in TEST_F()
534 ArrayRef<const LinkerPatch>(last_method_patches), in TEST_F()
543 ArrayRef<const uint8_t>(expected_code))); in TEST_F()
549 ArrayRef<const uint8_t> method1_code(method1_raw_code); in TEST_F()
559 ArrayRef<const LinkerPatch>(method1_patches), in TEST_F()
561 ArrayRef<const LinkerPatch>(), in TEST_F()
588 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
595 ArrayRef<const uint8_t> last_method_code(last_method_raw_code); in TEST_F()
604 ArrayRef<const LinkerPatch>(), in TEST_F()
606 ArrayRef<const LinkerPatch>(last_method_patches), in TEST_F()
622 ArrayRef<const uint8_t>(expected_code))); in TEST_F()
671 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
681 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
715 ArrayRef<const uint8_t> code(raw_code); in TestBakerFieldWide()
722 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TestBakerFieldWide()
738 CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TestBakerFieldWide()
744 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TestBakerFieldWide()
746 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TestBakerFieldWide()
747 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TestBakerFieldWide()
813 ArrayRef<const uint8_t> code(raw_code); in TestBakerFieldNarrow()
820 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TestBakerFieldNarrow()
839 CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TestBakerFieldNarrow()
845 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TestBakerFieldNarrow()
847 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TestBakerFieldNarrow()
848 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TestBakerFieldNarrow()
938 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
944 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(patches1)); in TEST_F()
952 ArrayRef<const uint8_t> filler1_code(raw_filler1_code); in TEST_F()
975 ArrayRef<const uint8_t> filler2_code(raw_filler2_code); in TEST_F()
979 ArrayRef<const uint8_t> code2(raw_code2); in TEST_F()
983 AddCompiledMethod(MethodRef(5u), code2, ArrayRef<const LinkerPatch>(patches2)); in TEST_F()
996 ASSERT_TRUE(CheckLinkedMethod(MethodRef(1), ArrayRef<const uint8_t>(expected_code1))); in TEST_F()
997 ASSERT_TRUE(CheckLinkedMethod(MethodRef(5), ArrayRef<const uint8_t>(expected_code2))); in TEST_F()
1006 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
1012 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(patches1)); in TEST_F()
1020 ArrayRef<const uint8_t> filler1_code(raw_filler1_code); in TEST_F()
1027 ASSERT_TRUE(CheckLinkedMethod(MethodRef(1), ArrayRef<const uint8_t>(expected_code1))); in TEST_F()
1036 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
1042 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(patches1)); in TEST_F()
1050 ArrayRef<const uint8_t> filler1_code(raw_filler1_code); in TEST_F()
1075 ArrayRef<const uint8_t> filler2_code(raw_filler2_code); in TEST_F()
1080 ArrayRef<const uint8_t> code2(raw_code2); in TEST_F()
1084 AddCompiledMethod(MethodRef(5u), code2, ArrayRef<const LinkerPatch>(patches2)); in TEST_F()
1099 ASSERT_TRUE(CheckLinkedMethod(MethodRef(1), ArrayRef<const uint8_t>(expected_code1))); in TEST_F()
1100 ASSERT_TRUE(CheckLinkedMethod(MethodRef(5), ArrayRef<const uint8_t>(expected_code2))); in TEST_F()
1116 ArrayRef<const uint8_t> code(raw_code); in TEST_F()
1121 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1133 EXPECT_TRUE(CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1138 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TEST_F()
1140 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TEST_F()
1141 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TEST_F()
1193 ArrayRef<const uint8_t> code(raw_code); in TEST_F()
1198 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1211 EXPECT_TRUE(CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1216 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TEST_F()
1218 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TEST_F()
1219 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TEST_F()
1248 ArrayRef<const uint8_t> code(raw_code); in TEST_F()
1253 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1266 EXPECT_TRUE(CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1271 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TEST_F()
1273 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TEST_F()
1274 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TEST_F()
1307 ArrayRef<const uint8_t>(code), in TEST_F()
1308 ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1319 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1336 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
1338 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(method1_patches)); in TEST_F()
1350 AddCompiledMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(filler_code)); in TEST_F()
1357 AddCompiledMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(filler_code)); in TEST_F()
1387 ArrayRef<const uint8_t>(last_method_raw_code), in TEST_F()
1388 ArrayRef<const LinkerPatch>(last_method_patches)); in TEST_F()