Lines Matching refs:dex_file
69 const DexFile* dex_file) { in GetVerifierDeps() argument
87 dex_files.push_back(dex_file); in GetVerifierDeps()
98 uint16_t GetClassDefIndex(const std::string& cls, const DexFile& dex_file) { in GetClassDefIndex() argument
99 const dex::TypeId* type_id = dex_file.FindTypeId(cls.c_str()); in GetClassDefIndex()
101 dex::TypeIndex type_idx = dex_file.GetIndexForTypeId(*type_id); in GetClassDefIndex()
102 const dex::ClassDef* class_def = dex_file.FindClassDef(type_idx); in GetClassDefIndex()
104 return dex_file.GetIndexForClassDef(*class_def); in GetClassDefIndex()
109 const DexFile& dex_file) { in HasVerifiedClass() argument
110 uint16_t class_def_idx = GetClassDefIndex(cls, dex_file); in HasVerifiedClass()
111 return deps->GetVerifiedClasses(dex_file)[class_def_idx]; in HasVerifiedClass()
114 std::string GetFilename(const std::unique_ptr<const DexFile>& dex_file) { in GetFilename() argument
115 const std::string& str = dex_file->GetLocation(); in GetFilename()
123 std::string GetOdex(const std::unique_ptr<const DexFile>& dex_file, in GetOdex() argument
125 return GetScratchDir() + "/" + GetFilename(dex_file) + suffix + ".odex"; in GetOdex()
128 std::string GetVdex(const std::unique_ptr<const DexFile>& dex_file, in GetVdex() argument
130 return GetScratchDir() + "/" + GetFilename(dex_file) + suffix + ".vdex"; in GetVdex()
145 std::unique_ptr<const DexFile> dex_file(OpenTestDexFile("Dex2oatVdexTestDex")); in TEST_F() local
150 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), GetOdex(dex_file), &api_dex_location)); in TEST_F()
152 std::unique_ptr<VerifierDeps> deps = GetVerifierDeps(GetVdex(dex_file), dex_file.get()); in TEST_F()
155 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessPublicCtor;", *dex_file)); in TEST_F()
156 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessPublicMethod;", *dex_file)); in TEST_F()
157 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessPublicMethodFromParent;", *dex_file)); in TEST_F()
158 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessPublicStaticMethod;", *dex_file)); in TEST_F()
159 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessPublicStaticField;", *dex_file)); in TEST_F()
163 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessNonPublicCtor;", *dex_file)); in TEST_F()
164 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessNonPublicMethod;", *dex_file)); in TEST_F()
165 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessNonPublicMethodFromParent;", *dex_file)); in TEST_F()
166 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessNonPublicStaticMethod;", *dex_file)); in TEST_F()
167 ASSERT_TRUE(HasVerifiedClass(deps, "LAccessNonPublicStaticField;", *dex_file)); in TEST_F()
174 CreateDexMetadata(GetVdex(dex_file), dm_file); in TEST_F()
178 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), GetOdex(dex_file), nullptr, false, extra_args)); in TEST_F()
180 std::unique_ptr<VerifierDeps> deps2 = GetVerifierDeps(GetVdex(dex_file), dex_file.get()); in TEST_F()
182 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessPublicCtor;", *dex_file)); in TEST_F()
183 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessPublicMethod;", *dex_file)); in TEST_F()
184 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessPublicMethodFromParent;", *dex_file)); in TEST_F()
185 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessPublicStaticMethod;", *dex_file)); in TEST_F()
186 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessPublicStaticField;", *dex_file)); in TEST_F()
188 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessNonPublicCtor;", *dex_file)) << output_; in TEST_F()
189 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessNonPublicMethod;", *dex_file)); in TEST_F()
190 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessNonPublicMethodFromParent;", *dex_file)); in TEST_F()
191 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessNonPublicStaticMethod;", *dex_file)); in TEST_F()
192 ASSERT_TRUE(HasVerifiedClass(deps2, "LAccessNonPublicStaticField;", *dex_file)); in TEST_F()
200 std::unique_ptr<const DexFile> dex_file(OpenTestDexFile("Dex2oatVdexTestDex")); in TEST_F() local
203 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), in TEST_F()
204 GetOdex(dex_file), in TEST_F()
210 CreateDexMetadata(GetVdex(dex_file), dm_file); in TEST_F()
216 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), in TEST_F()
217 GetOdex(dex_file, "v2"), in TEST_F()
228 std::unique_ptr<const DexFile> dex_file(OpenTestDexFile("Dex2oatVdexTestDex")); in TEST_F() local
234 CreateDexMetadata(dex_file->GetLocation(), dm_file); in TEST_F()
239 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), in TEST_F()
240 GetOdex(dex_file), in TEST_F()
252 std::unique_ptr<const DexFile> dex_file(OpenTestDexFile("Dex2oatVdexTestDex")); in TEST_F() local
254 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), in TEST_F()
255 GetOdex(dex_file), in TEST_F()
261 CreateDexMetadata(GetVdex(dex_file), dm_file); in TEST_F()