From 698ebbca3c54d17c696e87b9e5838df6a5ac9b08 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 5 Jan 2018 11:00:42 -0800 Subject: Clean up CodeItemAccessors and Compact/StandardDexFile Change constructor to use a reference to a dex file. Remove duplicated logic for GetCodeItemSize. Bug: 63756964 Test: test-art-host Change-Id: I69af8b93abdf6bdfa4454e16db8f4e75883bca46 --- compiler/compiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/compiler.cc') diff --git a/compiler/compiler.cc b/compiler/compiler.cc index 60977b6bd5..7c7ae71d77 100644 --- a/compiler/compiler.cc +++ b/compiler/compiler.cc @@ -47,7 +47,7 @@ bool Compiler::IsPathologicalCase(const DexFile::CodeItem& code_item, * Dalvik uses 16-bit uints for instruction and register counts. We'll limit to a quarter * of that, which also guarantees we cannot overflow our 16-bit internal Quick SSA name space. */ - CodeItemDataAccessor accessor(&dex_file, &code_item); + CodeItemDataAccessor accessor(dex_file, &code_item); if (accessor.InsnsSizeInCodeUnits() >= UINT16_MAX / 4) { LOG(INFO) << "Method exceeds compiler instruction limit: " << accessor.InsnsSizeInCodeUnits() -- cgit v1.2.3-59-g8ed1b