diff options
author | 2016-07-26 09:02:02 -0700 | |
---|---|---|
committer | 2016-08-01 18:54:48 -0700 | |
commit | 542451cc546779f5c67840e105c51205a1b0a8fd (patch) | |
tree | 11e09bb5abaee12dddffefbe7e425291076dfa7a /compiler/optimizing/sharpening.cc | |
parent | 85c4a4b8c9eabfe16e4e49f9b4aa78c1bf4be023 (diff) |
ART: Convert pointer size to enum
Move away from size_t to dedicated enum (class).
Bug: 30373134
Bug: 30419309
Test: m test-art-host
Change-Id: Id453c330f1065012e7d4f9fc24ac477cc9bb9269
Diffstat (limited to 'compiler/optimizing/sharpening.cc')
-rw-r--r-- | compiler/optimizing/sharpening.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc index 97f34e6c32..b73f73893c 100644 --- a/compiler/optimizing/sharpening.cc +++ b/compiler/optimizing/sharpening.cc @@ -17,6 +17,7 @@ #include "sharpening.h" #include "base/casts.h" +#include "base/enums.h" #include "class_linker.h" #include "code_generator.h" #include "driver/dex_compilation_unit.h" @@ -259,7 +260,7 @@ void HSharpening::ProcessLoadClass(HLoadClass* load_class) { load_class->SetLoadKindWithAddress(load_kind, address); break; case HLoadClass::LoadKind::kDexCachePcRelative: { - size_t pointer_size = InstructionSetPointerSize(codegen_->GetInstructionSet()); + PointerSize pointer_size = InstructionSetPointerSize(codegen_->GetInstructionSet()); DexCacheArraysLayout layout(pointer_size, &dex_file); size_t element_index = layout.TypeOffset(type_index); load_class->SetLoadKindWithDexCacheReference(load_kind, dex_file, element_index); @@ -358,7 +359,7 @@ void HSharpening::ProcessLoadString(HLoadString* load_string) { load_string->SetLoadKindWithAddress(load_kind, address); break; case HLoadString::LoadKind::kDexCachePcRelative: { - size_t pointer_size = InstructionSetPointerSize(codegen_->GetInstructionSet()); + PointerSize pointer_size = InstructionSetPointerSize(codegen_->GetInstructionSet()); DexCacheArraysLayout layout(pointer_size, &dex_file); size_t element_index = layout.StringOffset(string_index); load_string->SetLoadKindWithDexCacheReference(load_kind, dex_file, element_index); |