Lines Matching refs:ArrayRef
35 static const ArrayRef<const uint8_t> kCallCode;
37 static const ArrayRef<const uint8_t> kNopCode;
39 static const ArrayRef<const uint8_t> kUnpatchedPcRelativeCode;
139 bool Create2MethodsWithGap(const ArrayRef<const uint8_t>& method1_code, in Create2MethodsWithGap()
140 const ArrayRef<const LinkerPatch>& method1_patches, in Create2MethodsWithGap()
141 const ArrayRef<const uint8_t>& method3_code, in Create2MethodsWithGap()
142 const ArrayRef<const LinkerPatch>& method3_patches, in Create2MethodsWithGap()
159 ArrayRef<const uint8_t> method2_code(method2_raw_code); in Create2MethodsWithGap()
208 ArrayRef<const uint8_t> linked_code(&output_[thunk_offset], expected_code.size()); in CheckThunk()
209 if (linked_code == ArrayRef<const uint8_t>(expected_code)) { in CheckThunk()
213 DumpDiff(ArrayRef<const uint8_t>(expected_code), linked_code); in CheckThunk()
229 void CheckPcRelativePatch(const ArrayRef<const LinkerPatch>& patches, uint32_t target_offset);
278 const ArrayRef<const uint8_t> Thumb2RelativePatcherTest::kCallCode(kCallRawCode);
284 const ArrayRef<const uint8_t> Thumb2RelativePatcherTest::kNopCode(kNopRawCode);
291 const ArrayRef<const uint8_t> Thumb2RelativePatcherTest::kUnpatchedPcRelativeCode(
304 CheckPcRelativePatch(ArrayRef<const LinkerPatch>(patches), bss_begin_ + string_entry_offset); in TestStringBssEntry()
314 CheckPcRelativePatch(ArrayRef<const LinkerPatch>(patches), string_offset); in TestStringReference()
317 void Thumb2RelativePatcherTest::CheckPcRelativePatch(const ArrayRef<const LinkerPatch>& patches, in CheckPcRelativePatch()
319 AddCompiledMethod(MethodRef(1u), kUnpatchedPcRelativeCode, ArrayRef<const LinkerPatch>(patches)); in CheckPcRelativePatch()
345 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in CheckPcRelativePatch()
352 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
358 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
365 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(method1_patches)); in TEST_F()
369 AddCompiledMethod(MethodRef(2u), kCallCode, ArrayRef<const LinkerPatch>(method2_patches)); in TEST_F()
380 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(method1_expected_code))); in TEST_F()
385 EXPECT_TRUE(CheckLinkedMethod(MethodRef(2u), ArrayRef<const uint8_t>(method2_expected_code))); in TEST_F()
392 AddCompiledMethod(MethodRef(1u), kCallCode, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
400 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
407 ArrayRef<const uint8_t> method3_code(method3_raw_code); in TEST_F()
415 ArrayRef<const LinkerPatch>(), in TEST_F()
417 ArrayRef<const LinkerPatch>(method3_patches), in TEST_F()
430 EXPECT_TRUE(CheckLinkedMethod(MethodRef(3u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
437 ArrayRef<const uint8_t> method1_code(method1_raw_code); in TEST_F()
445 ArrayRef<const LinkerPatch>(method1_patches), in TEST_F()
447 ArrayRef<const LinkerPatch>(), in TEST_F()
453 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
459 ArrayRef<const uint8_t> method3_code(method3_raw_code); in TEST_F()
467 ArrayRef<const LinkerPatch>(), in TEST_F()
469 ArrayRef<const LinkerPatch>(method3_patches), in TEST_F()
475 EXPECT_TRUE(CheckLinkedMethod(MethodRef(3u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
481 ArrayRef<const uint8_t> method1_code(method1_raw_code); in TEST_F()
489 ArrayRef<const LinkerPatch>(method1_patches), in TEST_F()
491 ArrayRef<const LinkerPatch>(), in TEST_F()
508 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
515 ArrayRef<const uint8_t> method3_code(method3_raw_code); in TEST_F()
523 ArrayRef<const LinkerPatch>(), in TEST_F()
525 ArrayRef<const LinkerPatch>(method3_patches), in TEST_F()
537 EXPECT_TRUE(CheckLinkedMethod(MethodRef(3u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
596 ArrayRef<const uint8_t> code(raw_code); in TestBakerFieldWide()
603 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TestBakerFieldWide()
619 CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TestBakerFieldWide()
625 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TestBakerFieldWide()
627 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TestBakerFieldWide()
628 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TestBakerFieldWide()
698 ArrayRef<const uint8_t> code(raw_code); in TestBakerFieldNarrow()
705 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TestBakerFieldNarrow()
724 CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TestBakerFieldNarrow()
730 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TestBakerFieldNarrow()
732 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TestBakerFieldNarrow()
733 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TestBakerFieldNarrow()
811 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
817 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(patches1)); in TEST_F()
825 ArrayRef<const uint8_t> filler1_code(raw_filler1_code); in TEST_F()
848 ArrayRef<const uint8_t> filler2_code(raw_filler2_code); in TEST_F()
852 ArrayRef<const uint8_t> code2(raw_code2); in TEST_F()
856 AddCompiledMethod(MethodRef(5u), code2, ArrayRef<const LinkerPatch>(patches2)); in TEST_F()
869 ASSERT_TRUE(CheckLinkedMethod(MethodRef(1), ArrayRef<const uint8_t>(expected_code1))); in TEST_F()
870 ASSERT_TRUE(CheckLinkedMethod(MethodRef(5), ArrayRef<const uint8_t>(expected_code2))); in TEST_F()
879 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
885 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(patches1)); in TEST_F()
893 ArrayRef<const uint8_t> filler1_code(raw_filler1_code); in TEST_F()
900 ASSERT_TRUE(CheckLinkedMethod(MethodRef(1), ArrayRef<const uint8_t>(expected_code1))); in TEST_F()
909 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
915 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(patches1)); in TEST_F()
923 ArrayRef<const uint8_t> filler1_code(raw_filler1_code); in TEST_F()
948 ArrayRef<const uint8_t> filler2_code(raw_filler2_code); in TEST_F()
953 ArrayRef<const uint8_t> code2(raw_code2); in TEST_F()
957 AddCompiledMethod(MethodRef(5u), code2, ArrayRef<const LinkerPatch>(patches2)); in TEST_F()
972 ASSERT_TRUE(CheckLinkedMethod(MethodRef(1), ArrayRef<const uint8_t>(expected_code1))); in TEST_F()
973 ASSERT_TRUE(CheckLinkedMethod(MethodRef(5), ArrayRef<const uint8_t>(expected_code2))); in TEST_F()
993 ArrayRef<const uint8_t> code(raw_code); in TEST_F()
998 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1010 EXPECT_TRUE(CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1015 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TEST_F()
1017 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TEST_F()
1018 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TEST_F()
1074 ArrayRef<const uint8_t> code(raw_code); in TEST_F()
1080 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1093 EXPECT_TRUE(CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1098 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TEST_F()
1100 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TEST_F()
1101 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TEST_F()
1134 ArrayRef<const uint8_t> code(raw_code); in TEST_F()
1140 AddCompiledMethod(MethodRef(method_idx), code, ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1153 EXPECT_TRUE(CheckLinkedMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1158 ArrayRef<const uint8_t> compiled_thunk(output_.data() + thunk_offset, in TEST_F()
1160 if (ArrayRef<const uint8_t>(expected_thunk) != compiled_thunk) { in TEST_F()
1161 DumpDiff(ArrayRef<const uint8_t>(expected_thunk), compiled_thunk); in TEST_F()
1195 ArrayRef<const uint8_t>(code), in TEST_F()
1196 ArrayRef<const LinkerPatch>(patches)); in TEST_F()
1207 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
1224 ArrayRef<const uint8_t> code1(raw_code1); in TEST_F()
1226 AddCompiledMethod(MethodRef(1u), code1, ArrayRef<const LinkerPatch>(method1_patches)); in TEST_F()
1238 AddCompiledMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(filler_code)); in TEST_F()
1245 AddCompiledMethod(MethodRef(method_idx), ArrayRef<const uint8_t>(filler_code)); in TEST_F()
1277 ArrayRef<const uint8_t>(last_method_raw_code), in TEST_F()
1278 ArrayRef<const LinkerPatch>(last_method_patches)); in TEST_F()